summaryrefslogtreecommitdiff
path: root/package/base-files/extra/etc/network/if-post-down.d/01-bridge
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2009-12-29 01:04:10 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2009-12-29 01:04:10 +0100
commit08409051bea263523a0883b2fc3167d1da3612b4 (patch)
treed4aab582e33bd20ff4c14a71d33f008b0fb1e690 /package/base-files/extra/etc/network/if-post-down.d/01-bridge
parent00ba3e5ce046f7f8d140321e18985048dbfb54f6 (diff)
add atm network script
order network scripts. Add atm example. enable reboot option for mtd.
Diffstat (limited to 'package/base-files/extra/etc/network/if-post-down.d/01-bridge')
-rwxr-xr-xpackage/base-files/extra/etc/network/if-post-down.d/01-bridge24
1 files changed, 24 insertions, 0 deletions
diff --git a/package/base-files/extra/etc/network/if-post-down.d/01-bridge b/package/base-files/extra/etc/network/if-post-down.d/01-bridge
new file mode 100755
index 000000000..eda1fe3bf
--- /dev/null
+++ b/package/base-files/extra/etc/network/if-post-down.d/01-bridge
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+if [ ! -x /usr/sbin/brctl ]
+then
+ exit 0
+fi
+
+case "$IF_BRIDGE_PORTS" in
+ "")
+ exit 0
+ ;;
+ none)
+ INTERFACES=""
+ ;;
+ *)
+ INTERFACES="$IF_BRIDGE_PORTS"
+ ;;
+esac
+
+for IF in $INTERFACES; do
+ ip link set down dev $IF && brctl delif $IFACE $IF
+done
+
+ip link set down dev $IFACE || exit 1