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

amavisd-new.spec

index 54be8f042029623a79af52f03142ef7b745ec295..2d64bfed0adfd0f75c45c3ea327df4ab7704a7aa 100644 (file)
@@ -31,7 +31,9 @@ BuildRequires:        sh-utils
 BuildRequires: unarj
 BuildRequires: unrar
 BuildRequires: zoo
-Requires(pre): user-amavis
+Requires(pre): /bin/id
+Requires(pre): /usr/sbin/useradd
+Requires(postun):      /usr/sbin/userdel
 Requires(post,preun):  /sbin/chkconfig
 Requires:      /usr/lib/sendmail
 Requires:      arc
@@ -102,6 +104,21 @@ install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavisd
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+if [ -n "`id -u amavis 2>/dev/null`" ]; then
+       if [ "`id -u amavis`" != "97" ]; then
+               echo "Error: user amavis doesn't have uid=97. Correct this before installing amavis." 1>&2
+               exit 1
+       fi
+else
+       /usr/sbin/useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g nobody  amavis 1>&2
+fi
+
+%postun
+if [ "$1" = "0" ]; then
+       /usr/sbin/userdel amavis
+fi
+
 %post
 /sbin/chkconfig --add amavisd
 if [ -f /var/lock/subsys/amavisd ]; then
This page took 0.113363 seconds and 4 git commands to generate.