packages: dhcp/dhcp.init - force -4 and pidfile (dhcpd6 uses same binary an...
glen
glen at pld-linux.org
Thu Nov 19 20:26:20 CET 2009
Author: glen Date: Thu Nov 19 19:26:20 2009 GMT
Module: packages Tag: HEAD
---- Log message:
- force -4 and pidfile (dhcpd6 uses same binary and defaults to -6)
---- Files affected:
packages/dhcp:
dhcp.init (1.23 -> 1.24)
---- Diffs:
================================================================
Index: packages/dhcp/dhcp.init
diff -u packages/dhcp/dhcp.init:1.23 packages/dhcp/dhcp.init:1.24
--- packages/dhcp/dhcp.init:1.23 Thu Nov 19 14:20:25 2009
+++ packages/dhcp/dhcp.init Thu Nov 19 20:26:15 2009
@@ -36,7 +36,7 @@
# 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 @@
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 @@
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 @@
checkconfig 1
;;
status)
- status dhcpd
+ status --pidfile /var/run/dhcpd.pid dhcpd
exit $?
;;
*)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/dhcp/dhcp.init?r1=1.23&r2=1.24&f=u
More information about the pld-cvs-commit
mailing list