From: Arne Fitzenreiter Date: Tue, 17 Jun 2008 16:44:28 +0000 (+0200) Subject: Kill the dhcp server if it cannot shutdown in normal way X-Git-Tag: v2.3-beta1~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=274a6064f965f5bec237273fcc83ad972c5adc6b;p=ipfire-2.x.git Kill the dhcp server if it cannot shutdown in normal way --- diff --git a/src/initscripts/init.d/dhcp b/src/initscripts/init.d/dhcp index 02c3452901..abc6b5c8f9 100644 --- a/src/initscripts/init.d/dhcp +++ b/src/initscripts/init.d/dhcp @@ -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)