]> git.pld-linux.org Git - packages/clamav.git/commitdiff
- revert 1.254:
authorAdam Gołębiowski <adamg@pld-linux.org>
Wed, 25 Mar 2009 20:42:30 +0000 (20:42 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  Upgrading...
   1:clamav-libs            ########################################### [ 50%]
  Adding user clamav to group amavis
  usermod: `clamav' is primary group name.
  usermod: Unknown group `amavis'.
  error: %pre(clamav-0.95-0.1.i686) scriptlet failed, exit status 14
  error:   install: %pre scriptlet failed (2), skipping clamav-0.95-0.1

Changed files:
    clamav.spec -> 1.256

clamav.spec

index 0c061958b344f231f241c7a6601fa7530e0e357b..352cf0305cf5bc6f34da98ed7f3d05911abab304 100644 (file)
@@ -194,18 +194,39 @@ install -d $RPM_BUILD_ROOT/var/run/%{name}
 rm -rf $RPM_BUILD_ROOT
 
 %triggerin -- amavis-ng
-%addusertogroup clamav amavis
+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
 
 %triggerin -- amavisd-new
-%addusertogroup clamav amavis
+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
 
 %triggerin -- amavisd
-%addusertogroup clamav amavis
+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
 
 %pre
 %groupadd -g 43 clamav
 %useradd -u 43 -d /tmp -s /bin/false -c "Clam Anti Virus Checker" -g clamav clamav
-%addusertogroup clamav amavis
+
+# 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
 
 %post
 /sbin/chkconfig --add clamd
This page took 0.198184 seconds and 4 git commands to generate.