Kill the dhcp server if it cannot shutdown in normal way

This commit is contained in:
Arne Fitzenreiter
2008-06-17 18:44:28 +02:00
parent 40d4c45413
commit 274a6064f9

View File

@@ -31,6 +31,14 @@ case "$1" in
stop)
boot_mesg "Stopping DHCP Server..."
killproc -p /var/run/dhcpd.pid /usr/sbin/dhcpd
if [ "$(ps -A | grep " dhcpd")" != "" ] ; then
# if fail use the hard way ...
boot_mesg "Killing DHCP Server..."
killall -w -s KILL /usr/sbin/dhcpd > /dev/null 2>&1
rm -f /var/run/dhcpd.pid > /dev/null 2>&1
echo_ok;
exit 0
fi
;;
reload)