]> git.pld-linux.org Git - packages/dhcp.git/commitdiff
- umask in scripts, other fixes/cosmetics where needed
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 29 Dec 2002 18:00:55 +0000 (18:00 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dhcp.spec -> 1.79

dhcp.spec

index ca51ef6f4bc1fa19b23b0b09426ca1b642042bd7..83cd0eda1b27639db99deb66d5eb857823244eb1 100644 (file)
--- a/dhcp.spec
+++ b/dhcp.spec
@@ -17,8 +17,9 @@ Source4:      %{name}d.conf.sample
 Source5:       %{name}.sysconfig
 Patch0:                %{name}-sh.patch
 BuildRequires: groff
-Prereq:                rc-scripts >= 0.2.0
-Prereq:                /sbin/chkconfig
+PreReq:                rc-scripts >= 0.2.0
+Requires(post,preun):  /sbin/chkconfig
+Requires(post):        fileutils
 Provides:      dhcpd
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -57,6 +58,7 @@ software BETA.
 Summary:       DHCP Client
 Summary(pl):   Klient DHCP
 Group:         Networking/Daemons
+Requires(post):        fileutils
 Obsoletes:     pump
 
 %description client
@@ -69,8 +71,9 @@ Klient DHCP (Dynamic Host Configuration Protocol).
 Summary:       DHCP Relay Agent
 Summary(pl):   Agent przekazywania informacji DHCP
 Group:         Networking/Daemons
-Prereq:                rc-scripts >= 0.2.0
-Prereq:                /sbin/chkconfig
+PreReq:                rc-scripts >= 0.2.0
+Requires(post,preun):  /sbin/chkconfig
+Requires(post):        fileutils
 
 %description relay
 Dhcp relay is a relay agent for DHCP packets. It is used on a subnet
@@ -174,10 +177,23 @@ else
        echo "Run \"/etc/rc.d/init.d/dhcpd start\" to start dhcpd daemon."
 fi
 
+%preun
+if [ "$1" = "0" ];then
+       if [ -f /var/lock/subsys/dhcpd ]; then
+               /etc/rc.d/init.d/dhcpd stop >&2
+       fi
+       /sbin/chkconfig --del dhcpd
+fi
+
+%post client
+if [ -d /var/lib/dhcp ]; then
+       install -d /var/lib/dhcp
+fi
+
 %post relay
 /sbin/chkconfig --add dhcp-relay
 if [ -f /var/lock/subsys/dhcrelay ]; then
-       mv /var/lock/subsys/dhcrelay /var/lock/subsys/dhcp-relay
+       mv -f /var/lock/subsys/dhcrelay /var/lock/subsys/dhcp-relay
 fi
 if [ -f /var/lock/subsys/dhcp-relay ]; then
        /etc/rc.d/init.d/dhcp-relay restart >&2
@@ -185,19 +201,6 @@ else
        echo "Run \"/etc/rc.d/init.d/dhcp-relay start\" to start dhcrelay daemon."
 fi
 
-%post client
-if [ -d /var/lib/dhcp ]; then
-       install -d /var/lib/dhcp
-fi
-
-%preun
-if [ "$1" = "0" ];then
-       if [ -f /var/lock/subsys/dhcpd ]; then
-               /etc/rc.d/init.d/dhcpd stop >&2
-       fi
-       /sbin/chkconfig --del dhcpd
-fi
-
 %preun relay
 if [ "$1" = "0" ];then
        if [ -f /var/lock/subsys/dhcp-relay ]; then
@@ -208,6 +211,7 @@ fi
 
 %triggerpostun -- dhcp < 3.0
 if [ `grep ddns-update-style /etc/dhcpd.conf` = "" ]; then
+       umask 027
        echo "ddns-update-style none;" > /etc/dhcpd.conf.tmp
        echo "" >> /etc/dhcpd.conf.tmp
        cat /etc/dhcpd.conf >>/etc/dhcpd.conf.tmp
This page took 0.111715 seconds and 4 git commands to generate.