]> git.pld-linux.org Git - packages/boa.git/commitdiff
- removing http group is not good
authormick3y <mick3y@pld-linux.org>
Tue, 9 Jul 2002 18:30:13 +0000 (18:30 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    boa.spec -> 1.51

boa.spec

index b0c6d7a046b3fe4da4abe68e7bb5f6c66c458512..655e10ece2a1aef0337e957bafd1e09926757f90 100644 (file)
--- a/boa.spec
+++ b/boa.spec
@@ -90,6 +90,15 @@ gzip -9nf README ChangeLog
 rm -rf $RPM_BUILD_ROOT
 
 %pre
+if [ -n "`getgid http`" ]; then
+        if [ "`getgid http`" != "51" ]; then
+               echo "Error: group http doesn't have gid=51. Correct this before installing boa." 1>&2
+            exit 1
+        fi
+else
+        echo "Creating group http GID=51"
+        /usr/sbin/groupadd -g 51 -r -f http
+fi
 if [ -n "`id -u http 2>/dev/null`" ]; then
         if [ "`id -u http`" != "51" ]; then
                 echo "Error: user http doesn't have uid=51. Correct this before installing boa." 1>&2
@@ -97,13 +106,15 @@ if [ -n "`id -u http 2>/dev/null`" ]; then
         fi
 else
        echo "Creating user http UID=51"
-        /usr/sbin/useradd -u 51 -r -d /home/httpd -s /bin/false -c "HTTP User" http 1>&2
+        /usr/sbin/useradd -u 51 -r -d /home/httpd -s /bin/false -c "HTTP User" -g http http 1>&2
 fi
 
 %postun
 if [ "$1" = "0" ]; then
        echo "Removing user http UID=51"
        /usr/sbin/userdel http > /dev/null 2>&1
+       echo "Removing group http GID=51"
+        /usr/sbin/groupdel http > /dev/null 2>&1
 fi
 
 %post
This page took 0.063695 seconds and 4 git commands to generate.