]> git.pld-linux.org Git - packages/clamav.git/commitdiff
- simplify triggers - use addusertogroup macro
authorPaweł Gołaszewski <blues@pld-linux.org>
Mon, 16 Feb 2009 09:18:33 +0000 (09:18 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    clamav.spec -> 1.254

clamav.spec

index b383452ed86a640049ef940c9a47ffc980bb53af..ed8a0157cf28a1a5e6400f87657459144727e0e3 100644 (file)
@@ -199,39 +199,18 @@ install -d $RPM_BUILD_ROOT/var/run/%{name}
 rm -rf $RPM_BUILD_ROOT
 
 %triggerin -- amavis-ng
-AMAVIS=$(/usr/bin/getgid amavis)
-RESULT=$?
-if [ $RESULT -eq 0 ]; then
-       echo "Adding clamav to amavis group GID=$AMAVIS"
-       /usr/sbin/usermod -G amavis clamav 1>&2 > /dev/null
-fi
+%addusertogroup clamav amavis
 
 %triggerin -- amavisd-new
-AMAVIS=$(/usr/bin/getgid amavis)
-RESULT=$?
-if [ $RESULT -eq 0 ]; then
-       echo "Adding clamav to amavis group GID=$AMAVIS"
-       /usr/sbin/usermod -G amavis clamav 1>&2 > /dev/null
-fi
+%addusertogroup clamav amavis
 
 %triggerin -- amavisd
-AMAVIS=$(/usr/bin/getgid amavis)
-RESULT=$?
-if [ $RESULT -eq 0 ]; then
-       echo "Adding clamav to amavis group GID=$AMAVIS"
-       /usr/sbin/usermod -G amavis clamav 1>&2
-fi
+%addusertogroup clamav amavis
 
 %pre
 %groupadd -g 43 clamav
 %useradd -u 43 -d /tmp -s /bin/false -c "Clam Anti Virus Checker" -g clamav clamav
-
-# FIXME: check this. is it proper after useradd macro?
-# TODO: use addusertogroup macro?
-if [ -n "`/usr/bin/getgid amavis`" ]; then
-       echo "Adding clamav to amavis group"
-       /usr/sbin/usermod -G amavis clamav 1>&2
-fi
+%addusertogroup clamav amavis
 
 %post
 /sbin/chkconfig --add clamd
This page took 0.146814 seconds and 4 git commands to generate.