2 # Copyright (C) 2006 OpenWrt.org
4 [ $# = 0 ] && { echo " $0 <group>"; exit; }
10 debug
"### ifdown $cfg ###"
12 config_get proto
"$cfg" proto
13 [ -z "$proto" ] && { echo "interface not found."; exit; }
15 # kill active ppp daemon
16 pid
="$(cat /var/run/ppp-${cfg}.pid 2>/dev/null)"
17 [ -n "$pid" -a -d "/proc/$pid" ] && {
20 [ -d "/proc/$pid" ] && kill -9 $pid
23 # kill any other process associated with the interface
24 config_get ifname
"$cfg" ifname
25 pid
="$(cat /var/run/${ifname}.pid 2>/dev/null)"
26 [ -n "$pid" -a -d "/proc/$pid" ] && kill -9 $pid
28 config_get ifname
"$cfg" ifname
29 ifconfig
"$ifname" >/dev
/null
2>/dev
/null
&& {
30 ifconfig
"$ifname" 0.0.0.0 down
32 config_get iftype
"$cfg" type
33 [ "$iftype" = "bridge" ] && brctl delbr
"$ifname"
This page took 0.045279 seconds and 5 git commands to generate.