From 08409051bea263523a0883b2fc3167d1da3612b4 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 29 Dec 2009 01:04:10 +0100 Subject: add atm network script order network scripts. Add atm example. enable reboot option for mtd. --- .../extra/etc/network/if-post-down.d/01-bridge | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 package/base-files/extra/etc/network/if-post-down.d/01-bridge (limited to 'package/base-files/extra/etc/network/if-post-down.d/01-bridge') 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 -- cgit v1.2.3