]> git.pld-linux.org Git - packages/apache.git/commitdiff
- revert user changes
authorpascalek <pascalek@pld-linux.org>
Sat, 17 May 2003 05:57:13 +0000 (05:57 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache.spec -> 1.231

apache.spec

index 377d2d902a75e931dcfa19529adc0a6de201969d..72e962e693a65857658684a0f0c14a9e736f0a7a 100644 (file)
@@ -58,7 +58,12 @@ BuildRequires:       zlib-devel
 BuildRequires: libtool
 PreReq:                perl
 PreReq:                rc-scripts
-Requires(pre): user-http
+Requires(pre): /usr/bin/getgid
+Requires(pre): /bin/id
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
+Requires(postun):      /usr/sbin/userdel
+Requires(postun):      /usr/sbin/groupdel
 Requires(post,preun):  /sbin/chkconfig
 Requires(post,postun): /sbin/ldconfig
 Requires(post):                fileutils
@@ -731,6 +736,24 @@ ln -sf index.html.en $RPM_BUILD_ROOT%{_datadir}/html/index.html
 %clean
 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 apache." 1>&2
+               exit 1
+       fi
+else
+       /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 apache." 1>&2
+               exit 1
+       fi
+else
+       /usr/sbin/useradd -u 51 -r -d /home/services/httpd -s /bin/false -c "HTTP User" -g http http 1>&2
+fi
+
 %post
 /sbin/ldconfig
 /sbin/chkconfig --add httpd
@@ -752,6 +775,10 @@ fi
 
 %postun
 /sbin/ldconfig
+if [ "$1" = "0" ]; then
+       /usr/sbin/userdel http
+       /usr/sbin/groupdel http
+fi
 
 %post mod_actions
 if [ -f /var/lock/subsys/httpd ]; then
This page took 0.135274 seconds and 4 git commands to generate.