]> git.pld-linux.org Git - packages/exim.git/commitdiff
- use macros in %{pre,post}{,un}
authorsaq <saq@pld-linux.org>
Wed, 25 Jul 2001 16:30:43 +0000 (16:30 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- need rebuilt rpm (with new macros.pld) to build these

Changed files:
    exim.spec -> 1.67

exim.spec

index 94cdd4d38f3489b9e6560d2d3fc7144507ffc925..fb426fa6d2334abd9dc8598b4fa907d20695d478 100644 (file)
--- a/exim.spec
+++ b/exim.spec
@@ -171,54 +171,27 @@ gzip -9nf README* NOTICE LICENCE analyse-log-errors \
        util/transport-filter.pl
 
 %pre
-if [ -n "`/usr/bin/getgid exim`" ]; then
-       if [ "`getgid exim`" != "79" ]; then
-               echo "Warning: group exim haven't gid=79. Correct this before installing exim" 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/groupadd -g 79 -r -f exim
-fi
-
-if [ -n "`/bin/id -u exim 2>/dev/null`" ]; then
-       if [ "`id -u exim`" != "79" ]; then
-               echo "Warning: user exim doesn't have uid=79. Correct this before installing Exim" 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/useradd -u 79 -r -d /var/spool/exim -s /bin/false -c "Exim pseudo user" -g exim exim 1>&2
-fi
+GID=79; %groupadd
+UID=79; HOMEDIR=/var/spool/exim; COMMENT="Exim pseudo user"; %useradd
 
 %post
 umask 022
-/sbin/chkconfig --add %{name}
-if [ -f /var/lock/subsys/exim ]; then
-       /etc/rc.d/init.d/%{name} restart >&2
-else
-       echo "Run \"/etc/rc.d/init.d/%{name} start\" to start exim daemon."
-fi
+DESC="exim daemon"; %chkconfig_add
 
 if [ ! -f /etc/mail/mailname ]; then
        rm -f /etc/mail/mailname && hostname -f > /etc/mail/mailname
        chmod 644 /etc/mail/mailname
 fi
 newaliases
-[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
+%fix_info_dir
 
 %preun
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/exim ]; then
-               /etc/rc.d/init.d/exim stop >&2
-       fi
-       /sbin/chkconfig --del %{name}
-fi
+%chkconfig_del
 
 %postun
-[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
-if [ "$1" = "0" ]; then
-       /usr/sbin/userdel exim
-       /usr/sbin/groupdel exim
-fi
+%fix_info_dir
+%userdel
+%groupdel
 
 %clean
 rm -rf $RPM_BUILD_ROOT
This page took 0.260207 seconds and 4 git commands to generate.