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

ecartis.spec

index 21c49eb63881178a05884b26bfd4086efdc0b5be..a0e23c7139c5472f01b57ef22f2a95edcbc33b8d 100644 (file)
@@ -17,7 +17,10 @@ Patch1:              %{name}-conf.patch
 Patch2:                %{name}-paths.patch
 # Does not work :-/ Connection refused..
 URL:           http://www.ecartis.org/
 Patch2:                %{name}-paths.patch
 # Does not work :-/ Connection refused..
 URL:           http://www.ecartis.org/
-Requires(pre): user-ecartis
+Requires(pre): /usr/sbin/useradd
+Requires(pre): /usr/sbin/groupadd
+Requires(postun):      /usr/sbin/userdel
+Requires(postun):      /usr/sbin/groupdel
 Requires(post):        /bin/hostname
 Requires(post):        fileutils
 Requires(post):        grep
 Requires(post):        /bin/hostname
 Requires(post):        fileutils
 Requires(post):        grep
@@ -126,6 +129,33 @@ ln -sf %{_cgidir}/ecartisgate.cgi $RPM_BUILD_ROOT%{_cgidir}/listargate.cgi
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+if [ -n "`getgid %{name}`" ]; then
+       if [ "`getgid %{name}`" != "64" ]; then
+               echo "Error: group %{name} doesn't have gid=64. Correct this before installing %{name}." 1>&2
+               exit 1
+       fi
+else
+       echo "Adding group %{name} GID=64"
+       /usr/sbin/groupadd -f -g 64 -r %{name}
+fi
+
+if [ -n "`id -u %{name} 2>/dev/null`" ]; then
+       if [ "`id -u %{name}`" != "64" ]; then
+               echo "Error: user %{name} doesn't have uid=64. Correct this before installing %{name}." 1>&2
+               exit 1
+       fi
+else
+       echo "Adding user %{name} UID=64"
+       /usr/sbin/useradd -u 64 -r -d %{_ecartisdir}  -s /bin/false -c "Ecartis User" -g %{name} %{name} 1>&2
+fi
+
+%postun
+if [ "$1" = "0" ]; then
+       /usr/sbin/userdel       %{name}
+       /usr/sbin/groupdel      %{name}
+fi
+
 %post
 # alias:
 umask 022
 %post
 # alias:
 umask 022
This page took 0.120866 seconds and 4 git commands to generate.