base-files, ppp: fix interface shutdown

SVN-Revision: 21386
This commit is contained in:
Jo-Philipp Wich
2010-05-06 01:14:24 +00:00
parent 66ab73d01f
commit dd38b15b75
2 changed files with 7 additions and 8 deletions

View File

@@ -333,12 +333,12 @@ stop_interface_dhcp() {
local config="$1"
local iface
config_get iface "$config" iface
config_get ifname "$config" ifname
local lock="/var/lock/dhcp-${iface}"
local lock="/var/lock/dhcp-${ifname}"
[ -f "$lock" ] && lock -u "$lock"
local pidfile="/var/run/dhcp-${iface}.pid"
local pidfile="/var/run/dhcp-${ifname}.pid"
local pid="$(cat "$pidfile" 2>/dev/null)"
[ -d "/proc/$pid" ] && {
grep -qs udhcpc "/proc/$pid/cmdline" && kill -TERM $pid && \