From 2fde9985573f0e2582561ad261e2cde77c1a0403 Mon Sep 17 00:00:00 2001 From: nbd Date: Fri, 15 Jul 2005 16:56:23 +0000 Subject: give basic commandline help git-svn-id: svn://svn.openwrt.org/openwrt/trunk@1447 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- openwrt/target/default/target_skeleton/sbin/ifdown | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'openwrt/target/default/target_skeleton/sbin/ifdown') 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 "; 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>&- -- cgit v1.2.3