freewrt_1_0
freewrt_2_0
| Line | |
|---|
| 1 | #!/bin/sh
|
|---|
| 2 | [ $# = 0 ] && { echo " $0 <group>"; exit; }
|
|---|
| 3 | . /etc/functions.sh
|
|---|
| 4 |
|
|---|
| 5 | type=$1
|
|---|
| 6 | debug "### ifdown $type ###"
|
|---|
| 7 |
|
|---|
| 8 | if=$(nvram get ${type}_ifname)
|
|---|
| 9 | proto=$(nvram get ${type}_proto)
|
|---|
| 10 | if_valid $if && $DEBUG ifconfig $if down
|
|---|
| 11 | [ -r /var/run/${if}.pid ] && kill $(cat /var/run/${if}.pid 2>&-) 2>&-
|
|---|
| 12 | killall ifup.$proto >&- 2>&-
|
|---|
| 13 | case "$proto" in
|
|---|
| 14 | pptp|pppoe) killall pppd >&- 2>&- ;;
|
|---|
| 15 | static) env -i ACTION="ifdown" INTERFACE="$if" PROTO=static /sbin/hotplug "iface" ;;
|
|---|
| 16 | esac
|
|---|
| 17 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.