From dd38b15b7545e8250859f6e2583f90dc9a8d5a66 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 6 May 2010 01:14:24 +0000 Subject: base-files, ppp: fix interface shutdown SVN-Revision: 21386 --- package/ppp/files/ppp.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'package/ppp') 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" } -- cgit v1.2.3