disable squashfs auto-clean for non-broadcom stuff
[openwrt/svn-archive/archive.git] / openwrt / package / base-files / default / sbin / ifdown
1 #!/bin/sh
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
7 type=$1
8 debug "### ifdown $type ###"
9
10 if=$(nvram get ${type}_ifname)
11 proto=$(nvram get ${type}_proto)
12 if_valid $if && $DEBUG ifconfig $if down
13 kill $(cat /var/run/${if}.pid 2>&-) 2>&-
14 killall ifup.$proto >&- 2>&-
15 case "$proto" in
16 pptp|pppoe) killall pppd >&- 2>&- ;;
17 static) env -i ACTION="ifdown" INTERFACE="$if" PROTO=static /sbin/hotplug "iface" ;;
18 esac
19