SPECS: havp.spec - use pld macros; hopefully correctly

glen glen at pld-linux.org
Wed Apr 18 23:44:40 CEST 2007


Author: glen                         Date: Wed Apr 18 21:44:40 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use pld macros; hopefully correctly

---- Files affected:
SPECS:
   havp.spec (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: SPECS/havp.spec
diff -u SPECS/havp.spec:1.3 SPECS/havp.spec:1.4
--- SPECS/havp.spec:1.3	Wed Apr 18 20:06:33 2007
+++ SPECS/havp.spec	Wed Apr 18 23:44:34 2007
@@ -22,8 +22,10 @@
 Requires(postun,pre):	/usr/sbin/usermod
 Requires(pre):	/bin/id
 Requires(pre):	/usr/bin/getgid
+Requires(pre):	/usr/lib/rpm/user_group.sh
 Requires(pre):	/usr/sbin/groupadd
 Requires(pre):	/usr/sbin/useradd
+Requires(pre):	/usr/sbin/usermod
 Requires:	clamav
 Requires:	logrotate
 Provides:	group(havp)
@@ -76,11 +78,10 @@
 %pre
 %groupadd -g 215 havp
 %useradd -u 215 -d /tmp -s /bin/false -c "HTTP Antivirus Proxy" -g havp havp
-
-if [ -n "`/usr/bin/getgid clamav`" ]; then
-    echo "Adding clamav to havp group."
-    /usr/sbin/usermod -G havp clamav 1>&2
-    %service clamd restart
+m=$(%addusertogroup clamav havp)
+if [ -n "$m" ]; then
+	echo >&2 "$m"
+	%service -q clamd restart
 fi
 
 %post
@@ -139,6 +140,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.4  2007/04/18 21:44:34  glen
+- use pld macros; hopefully correctly
+
 Revision 1.3  2007/04/18 18:06:33  kosmo
 - thinking too fast is not good ...
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/havp.spec?r1=1.3&r2=1.4&f=u



More information about the pld-cvs-commit mailing list