diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-05-05 23:24:11 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-05-05 23:24:11 +0000 |
commit | 66ab73d01f264bd8d3043809d47ab071ad3670a0 (patch) | |
tree | 81c60ad8a22f3ba5116db855dc1a563c55f1b244 /package/base-files/files/sbin | |
parent | 731983969a1340b613db96111eb7371d57728dd6 (diff) | |
download | mtk-20170518-66ab73d01f264bd8d3043809d47ab071ad3670a0.zip mtk-20170518-66ab73d01f264bd8d3043809d47ab071ad3670a0.tar.gz mtk-20170518-66ab73d01f264bd8d3043809d47ab071ad3670a0.tar.bz2 |
base-files, ppp: remove protocol specific cleanup code from /sbin/ifdown and move it to protocol stop callbacks
SVN-Revision: 21383
Diffstat (limited to 'package/base-files/files/sbin')
-rwxr-xr-x | package/base-files/files/sbin/ifdown | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/package/base-files/files/sbin/ifdown b/package/base-files/files/sbin/ifdown index 8de414d..7c6a5b7 100755 --- a/package/base-files/files/sbin/ifdown +++ b/package/base-files/files/sbin/ifdown @@ -29,28 +29,6 @@ config_get iface "$cfg" device # call interface stop handler ( type "stop_interface_$proto" ) >/dev/null 2>/dev/null && eval "stop_interface_$proto '$cfg'" -# make sure all locks are removed -for lock in "/var/lock/dhcp-$iface" "/var/lock/ppp-$iface"; do - [ -f "$lock" ] && { - lock -u "$lock" - sleep 1 - } -done - -# kill active ppp daemon and other processes -config_get ifname "$cfg" ifname -pids="$(head -n1 -q /var/run/${ifname}.pid /var/run/ppp-${cfg}.pid 2>/dev/null)" -for pid in $pids; do - [ -d "/proc/$pid" ] && { - kill $pid - [ -d "/proc/$pid" ] && { - sleep 1 - kill -9 $pid 2>/dev/null >/dev/null - } - } -done -rm -f /var/run/${ifname}.pid /var/run/ppp-${cfg}.pid - config_get ifname "$cfg" ifname config_get device "$cfg" device |