diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-07-15 16:56:23 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-07-15 16:56:23 +0000 |
commit | 2fde9985573f0e2582561ad261e2cde77c1a0403 (patch) | |
tree | 5916271b3053479c892a4760de2cff1f52845a6d /openwrt/target/default/target_skeleton/sbin/ifdown | |
parent | 67cf2627a2661ec356d3468fc3f37ff2f441a9aa (diff) |
give basic commandline help
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@1447 3c298f89-4303-0410-b956-a3cf2f4a3e73
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>&- |