diff options
Diffstat (limited to 'openwrt/target/default/target_skeleton/sbin/ifdown')
-rwxr-xr-x | openwrt/target/default/target_skeleton/sbin/ifdown | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/openwrt/target/default/target_skeleton/sbin/ifdown b/openwrt/target/default/target_skeleton/sbin/ifdown index e59e05739..6b255cc1b 100755 --- a/openwrt/target/default/target_skeleton/sbin/ifdown +++ b/openwrt/target/default/target_skeleton/sbin/ifdown @@ -1,8 +1,9 @@ #!/bin/ash +[ $# = 0 ] && { echo " $0 <group>"; exit; } . /etc/functions.sh - type=$1 - debug "### ifdown $type ###" - if=$(nvram get ${type}_ifname) - if_valid $if || return - kill $(cat /var/run/${if}.pid 2>&-) 2>&- - $DEBUG ifconfig $if down +type=$1 +debug "### ifdown $type ###" +if=$(nvram get ${type}_ifname) +if_valid $if || exit +$DEBUG ifconfig $if down +kill $(cat /var/run/${if}.pid 2>&-) 2>&- |