This commit was manufactured by cvs2svn to create tag 'whiterussian_rc3'.
[openwrt/svn-archive/openwrt.git] / openwrt / package / base-files / default / sbin / ifdown
1 #!/bin/ash
2 [ $# = 0 ] && { echo " $0 <group>"; exit; }
3 . /etc/functions.sh
4 type=$1
5 debug "### ifdown $type ###"
6 if=$(nvram get ${type}_ifname)
7 proto=$(nvram get ${type}_proto)
8 if_valid $if && $DEBUG ifconfig $if down
9 kill $(cat /var/run/${if}.pid 2>&-) 2>&-
10 [ "$if" = "ppp0" ] && killall pppd
11 killall ifup.$proto >&- 2>&-