diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-04-05 02:09:22 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-04-05 02:09:22 +0000 |
commit | ee27e41337497f69d27cd689fe19ba2c89e95f79 (patch) | |
tree | 302d5239acd2ed8e10f5310599a381bb22f193e0 /openwrt/package/base-files/default/sbin/ifdown | |
parent | e4b534024d6dc903ef48628dda1203d0d7c5bfcb (diff) | |
download | mtk-20170518-ee27e41337497f69d27cd689fe19ba2c89e95f79.zip mtk-20170518-ee27e41337497f69d27cd689fe19ba2c89e95f79.tar.gz mtk-20170518-ee27e41337497f69d27cd689fe19ba2c89e95f79.tar.bz2 |
large init script cleanup and merge of whiterussian changes, new dnsmasq config handling
SVN-Revision: 3588
Diffstat (limited to 'openwrt/package/base-files/default/sbin/ifdown')
-rwxr-xr-x | openwrt/package/base-files/default/sbin/ifdown | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/openwrt/package/base-files/default/sbin/ifdown b/openwrt/package/base-files/default/sbin/ifdown index d0120dc..0d85ca8 100755 --- a/openwrt/package/base-files/default/sbin/ifdown +++ b/openwrt/package/base-files/default/sbin/ifdown @@ -1,26 +1,18 @@ #!/bin/sh [ $# = 0 ] && { echo " $0 <group>"; exit; } . /etc/functions.sh -. /etc/network.overrides -[ "$FAILSAFE" != "true" -a -e /etc/config/network ] && . /etc/config/network +. /etc/config/network debug "### ifdown $type ###" type=$1 -if_proto=$(nvram get ${type}_proto) -if=$(nvram get ${type}_ifname) +eval "if_proto=\"\${${type}_proto}\"" +eval "if=\"\${${type}_ifname}\"" +[ "${if%%[0-9]}" = "ppp" ] && eval "if=\"\${${type}_device}\"" case "$if_proto" in pppoa) hotplug_dev unregister atm0; exit 0 ;; ""|none) exit 0;; esac -[ "${if%%[0-9]*}" = "ppp" ] && if="$(nvram get ${type}_device)" - -if [ "${if%%[0-9]}" = "br" ]; then - for sif in $(nvram get ${type}_ifnames); do - hotplug_dev unregister "$sif" - done -fi - hotplug_dev unregister "$if" |