2 # Copyright (C) 2006 OpenWrt.org
4 [ $# = 0 ] && { echo " $0 <group>"; exit; }
9 debug
"### ifdown $type ###"
12 config_get proto
"$type" proto
13 [ -z "$proto" ] && { echo "interface not found."; exit; }
15 # kill active ppp daemon
16 pid
="$(cat /var/run/ppp-${type}.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
"$type" 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
"$type" ifname
29 ifconfig
"$ifname" >/dev
/null
2>/dev
/null
&& {
30 ifconfig
"$ifname" 0.0.0.0 down
32 config_get iftype
"$type" type
33 [ "$iftype" = "bridge" ] && brctl delbr
"$ifname"
This page took 0.0484830000000001 seconds and 5 git commands to generate.