diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-05-06 01:14:24 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-05-06 01:14:24 +0000 |
commit | dd38b15b7545e8250859f6e2583f90dc9a8d5a66 (patch) | |
tree | e837636bb23ccc99eea7949968b4255a3a51f7d3 /package | |
parent | 66ab73d01f264bd8d3043809d47ab071ad3670a0 (diff) | |
download | upstream-dd38b15b7545e8250859f6e2583f90dc9a8d5a66.tar.gz upstream-dd38b15b7545e8250859f6e2583f90dc9a8d5a66.tar.bz2 upstream-dd38b15b7545e8250859f6e2583f90dc9a8d5a66.zip |
base-files, ppp: fix interface shutdown
SVN-Revision: 21386
Diffstat (limited to 'package')
-rwxr-xr-x | package/base-files/files/lib/network/config.sh | 6 | ||||
-rw-r--r-- | package/ppp/files/ppp.sh | 9 |
2 files changed, 7 insertions, 8 deletions
diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh index 80547b76d5..4336244f6e 100755 --- a/package/base-files/files/lib/network/config.sh +++ b/package/base-files/files/lib/network/config.sh @@ -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 && \ diff --git a/package/ppp/files/ppp.sh b/package/ppp/files/ppp.sh index b3c9e53655..f4417bb67e 100644 --- a/package/ppp/files/ppp.sh +++ b/package/ppp/files/ppp.sh @@ -7,15 +7,14 @@ stop_interface_ppp() { local ifname config_get ifname "$cfg" ifname - local link="${proto:-ppp}-$ifname" - [ -f "/var/run/ppp-${link}.pid" ] && { - local pid="$(head -n1 /var/run/ppp-${link}.pid 2>/dev/null)" + [ -f "/var/run/ppp-${ifname}.pid" ] && { + local pid="$(head -n1 /var/run/ppp-${ifname}.pid 2>/dev/null)" grep -qs pppd "/proc/$pid/cmdline" && kill -TERM $pid && \ while grep -qs pppd "/proc/$pid/cmdline"; do sleep 1; done - rm -f "/var/run/ppp-${link}.pid" + rm -f "/var/run/ppp-${ifname}.pid" } - local lock="/var/lock/ppp-$link" + local lock="/var/lock/ppp-$ifname" [ -f "$lock" ] && lock -u "$lock" } |