]> git.pld-linux.org Git - packages/dhcp.git/commitdiff
- force -4 and pidfile (dhcpd6 uses same binary and defaults to -6)
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 19 Nov 2009 19:26:15 +0000 (19:26 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dhcp.init -> 1.24

dhcp.init

index eeae182ed7efe32f236a07b3135bbab859f4ca35..da30605c4f2d18b47dc0d00ff0e65135e443b7a4 100644 (file)
--- a/dhcp.init
+++ b/dhcp.init
@@ -36,7 +36,7 @@ check_device_up()
 # configtest itself
 configtest() {
        local rc=0
-       /sbin/dhcpd -q -t -T || rc=$?
+       /sbin/dhcpd -4 -q -t -T || rc=$?
 
        # check if interfaces specified exist and have addresses
        for i in $DHCPD_INTERFACES; do
@@ -87,7 +87,7 @@ start() {
 
        checkconfig
        msg_starting "DHCP Server"
-       daemon /sbin/dhcpd -q $DHCPD_INTERFACES
+       daemon /sbin/dhcpd -4 -q $DHCPD_INTERFACES
        RETVAL=$?
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcpd
 }
@@ -99,19 +99,20 @@ stop() {
        fi
 
        msg_stopping "DHCP Server"
-       killproc dhcpd
+       killproc --pidfile /var/run/dhcpd.pid dhcpd
        rm -f /var/run/dhcpd.pid /var/lock/subsys/dhcpd >/dev/null 2>&1
 }
 
 condrestart() {
-       if [ -f /var/lock/subsys/dhcpd ]; then
-               checkconfig
-               stop
-               start
-       else
-               msg_not_running dhcpd
+       if [ ! -f /var/lock/subsys/dhcpd ]; then
+               msg_not_running "DHCP Server"
                RETVAL=$1
+               return
        fi
+
+       checkconfig
+       stop
+       start
 }
 
 RETVAL=0
@@ -138,7 +139,7 @@ case "$1" in
        checkconfig 1
        ;;
   status)
-       status dhcpd
+       status --pidfile /var/run/dhcpd.pid dhcpd
        exit $?
        ;;
   *)
This page took 0.149004 seconds and 4 git commands to generate.