summaryrefslogtreecommitdiff
path: root/target/default/target_skeleton/sbin/ifdown
diff options
context:
space:
mode:
Diffstat (limited to 'target/default/target_skeleton/sbin/ifdown')
-rwxr-xr-xtarget/default/target_skeleton/sbin/ifdown13
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>&-