mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
[package] base-files, ppp: fix interface shutdown
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21386 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -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 && \
|
||||
|
||||
Reference in New Issue
Block a user