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 | fb0679306fee326fb4276e0b75e3fb1604398d6d (patch) | |
tree | db83ccef3dab90be4a53568b6a89839b76d283cc /package/ppp | |
parent | 2a8c7ceaf4a1b8b7efc230148082b64d53bbf1e2 (diff) | |
download | upstream-fb0679306fee326fb4276e0b75e3fb1604398d6d.tar.gz upstream-fb0679306fee326fb4276e0b75e3fb1604398d6d.tar.bz2 upstream-fb0679306fee326fb4276e0b75e3fb1604398d6d.zip |
[package] base-files, ppp: fix interface shutdown
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21386 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/ppp')
-rw-r--r-- | package/ppp/files/ppp.sh | 9 |
1 files changed, 4 insertions, 5 deletions
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" } |