]> git.pld-linux.org Git - packages/exim.git/commitdiff
- reverting last change: removing new macros from %p{re,ost}{,un}
authorsaq <saq@pld-linux.org>
Thu, 26 Jul 2001 05:42:06 +0000 (05:42 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    exim.spec -> 1.68

exim.spec

index fb426fa6d2334abd9dc8598b4fa907d20695d478..94cdd4d38f3489b9e6560d2d3fc7144507ffc925 100644 (file)
--- a/exim.spec
+++ b/exim.spec
@@ -171,27 +171,54 @@ gzip -9nf README* NOTICE LICENCE analyse-log-errors \
        util/transport-filter.pl
 
 %pre
-GID=79; %groupadd
-UID=79; HOMEDIR=/var/spool/exim; COMMENT="Exim pseudo user"; %useradd
+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
 
 %post
 umask 022
-DESC="exim daemon"; %chkconfig_add
+/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
 
 if [ ! -f /etc/mail/mailname ]; then
        rm -f /etc/mail/mailname && hostname -f > /etc/mail/mailname
        chmod 644 /etc/mail/mailname
 fi
 newaliases
-%fix_info_dir
+[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
 
 %preun
-%chkconfig_del
+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
 
 %postun
-%fix_info_dir
-%userdel
-%groupdel
+[ ! -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
 
 %clean
 rm -rf $RPM_BUILD_ROOT
This page took 0.326901 seconds and 4 git commands to generate.