backport base-files fix from whiterussian [2308],
[openwrt.git] / openwrt / package / base-files / default / sbin / ifdown
1 #!/bin/ash
2 [ $# = 0 ] && { echo " $0 <group>"; exit; }
3 . /etc/functions.sh
4 . /etc/network.overrides
5 [ "$FAILSAFE" != "true" -a -e /etc/config/network ] && . /etc/config/network
6 type=$1
7 debug "### ifdown $type ###"
8 if=$(nvram get ${type}_ifname)
9 proto=$(nvram get ${type}_proto)
10 if_valid $if && $DEBUG ifconfig $if down
11 kill $(cat /var/run/${if}.pid 2>&-) 2>&-
12 [ "$if" = "ppp0" ] && killall pppd
13 killall ifup.$proto >&- 2>&-
This page took 0.038697 seconds and 5 git commands to generate.