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 | c12f5d086cad8d7229c05c99405ae05b7d5b05ef (patch) | |
tree | fb537ef01d470b4c068a202f4f39eb7c8a84a14a /target/default/target_skeleton/sbin/ifdown | |
parent | ae580f46364e621c99bd22f643d07a21af41885c (diff) |
give basic commandline help
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1447 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/default/target_skeleton/sbin/ifdown')
-rwxr-xr-x | target/default/target_skeleton/sbin/ifdown | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/target/default/target_skeleton/sbin/ifdown b/target/default/target_skeleton/sbin/ifdown index e59e057397..6b255cc1b8 100755 --- a/target/default/target_skeleton/sbin/ifdown +++ b/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>&- |