Author: baggins                      Date: Wed Jan 18 18:03:14 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use groupadd macro
- don't remove logs on uninstall

---- Files affected:
SPECS:
   zmailer.spec (1.75 -> 1.76) 

---- Diffs:

================================================================
Index: SPECS/zmailer.spec
diff -u SPECS/zmailer.spec:1.75 SPECS/zmailer.spec:1.76
--- SPECS/zmailer.spec:1.75     Tue Dec 13 16:51:53 2005
+++ SPECS/zmailer.spec  Wed Jan 18 19:03:08 2006
@@ -286,34 +286,16 @@
 
 if [ "$1" = "0" ]; then
        /sbin/chkconfig --del zmailer
-       rm -f /var/log/mail/*
 fi
 
 %pre
-if ! grep -q "^zmailer:" /etc/group; then
-       echo "zmailer::47:root,petidomo,uucp,daemon,news" >>/etc/group
-fi
-#if [ -n "`/usr/bin/getgid zmailer`" ]; then
-#      if [ "`/usr/bin/getgid zmailer`" != "47" ]; then
-#              echo "Error: group zmailer doesn't have gid=47. Correct this 
before installing zmailer." 1>&2
-#              exit 1
-#      else
-#              for u in root petidomo uucp daemon news; do
-#                      GROUPS=/bin/id -n -G $u | sed 's/ /,/g'
-#                      if [ -z `echo $GROUPS | grep '\(^\|,\)zmailer\($\|,\)'; 
then
-#                              usermod -G "${GROUPS},zmailer" $u 1>&2 ||:
-#                      fi
-#              done
-#      fi
-#else
-#      echo "Adding group zmailer GID=47."
-#      if /usr/sbin/groupadd -g 47 zmailer 1>&2; then
-#              for u in root petidomo uucp daemon news; do
-#                      GROUPS=`/bin/id -n -G $u | sed 's/ /,/g'`
-#                      usermod -G "${GROUPS},zmailer" $u 1>&2 ||:
-#              done
-#      fi
-#fi
+%groupadd -g 47 zmailer
+for u in root petidomo uucp daemon news; do
+       GROUPS=/bin/id -n -G $u | sed 's/ /,/g'
+       if [ -z `echo $GROUPS | grep '\(^\|,\)zmailer\($\|,\)'; then
+               /usr/sbin/usermod -G "${GROUPS},zmailer" $u 1>&2 ||:
+       fi
+done
 
 %postun
 if [ "$1" = "0" ]; then
@@ -385,6 +367,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.76  2006/01/18 18:03:08  baggins
+- use groupadd macro
+- don't remove logs on uninstall
+
 Revision 1.75  2005/12/13 15:51:53  glen
 - adapterized (sorted %verify attrs)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/zmailer.spec?r1=1.75&r2=1.76&f=u

_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to