]> git.pld-linux.org Git - packages/bind.git/commitdiff
- use macros in %{pre,post}{,un}
authorsaq <saq@pld-linux.org>
Wed, 25 Jul 2001 16:30:42 +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:
    bind.spec -> 1.105

bind.spec

index b68518a73b2ceca56747386258c6e66adedffcda..d5636e6c594ca951ae7a26960dfc0e125b6aa951 100644 (file)
--- a/bind.spec
+++ b/bind.spec
@@ -228,35 +228,18 @@ if [ -f %{_sysconfdir}/named.boot ]; then
        mv -f %{_sysconfdir}/named.boot /etc/named.rpmsave
        echo "Warning:%{_sysconfdir}/named.boot saved as /etc/named.rpmsave" 1>&2
 fi
-if ! id -g named > /dev/null 2>&1 ; then
-       %{_sbindir}/groupadd -g 58 named
-fi
-if ! id -u named > /dev/null 2>&1 ; then
-       %{_sbindir}/useradd -u 58 -g 58 -d /dev/null -s /bin/false -c "BIND user" named
-fi
+GROUP=named; GID=58; %groupadd
+USER=named; UID=58; HOMEDIR=/dev/null; COMMENT="BIND user"; %useradd
 
 %post
-/sbin/chkconfig --add named
-
-if [ -f /var/lock/subsys/named ]; then
-       %{_sysconfdir}/rc.d/init.d/named restart 1>&2
-else
-       echo "Type \"%{_sysconfdir}/rc.d/init.d/named start\" to start named" 1>&2
-fi
+NAME=named; %chkconfig_post
 
 %preun
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/named ]; then
-               %{_sysconfdir}/rc.d/init.d/named stop 1>&2
-       fi
-       /sbin/chkconfig --del named
-fi    
+NAME=named; %chkconfig_preun
 
 %postun
-if [ "$1" = "0" ]; then
-       %{_sbindir}/userdel named
-       %{_sbindir}/groupdel named
-fi
+USER=named; %userdel
+GROUP=named; %groupdel
 
 %post   libs -p /sbin/ldconfig
 %postun libs -p /sbin/ldconfig
This page took 0.033148 seconds and 4 git commands to generate.