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

mathopd.spec

index fa52fa9af2b5e63659d3d06462334645272ad9ca..be2177215e2fab9cfaa4beea117229b23f7c4032 100644 (file)
@@ -12,7 +12,12 @@ URL:         http://www.mathopd.org/
 Provides:      httpd
 Provides:      webserver
 Requires(pre): sh-utils
-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
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -49,6 +54,24 @@ install src/mathopd $RPM_BUILD_ROOT%{_sbindir}
 %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 %{name}." 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 %{name}." 1>&2
+               exit 1
+       fi
+else
+       /usr/sbin/useradd -u 51 -r -d /home/httpd -s /bin/false -c "HTTP User" -g http http 1>&2
+fi
+
 %post
 /sbin/chkconfig --add %{name}
 if [ -f /var/lock/subsys/mathopd ]; then
@@ -65,6 +88,12 @@ if [ "$1" = "0" ]; then
        /sbin/chkconfig --del %{name}
 fi
 
+%postun
+if [ "$1" = "0" ]; then
+       /usr/sbin/userdel http
+       /usr/sbin/groupdel http
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc [A-Z]* doc/*
This page took 0.094449 seconds and 4 git commands to generate.