summaryrefslogtreecommitdiff
path: root/templates/interfaces/bridge/node.def
diff options
context:
space:
mode:
authorMohit Mehta <mohit.mehta@vyatta.com>2010-02-18 17:11:35 -0800
committerMohit Mehta <mohit.mehta@vyatta.com>2010-02-18 17:11:35 -0800
commitfab23c4e4b7e5566e43ccbaa9f4dbc7d1b60fc69 (patch)
tree6f575f9aaf66f266315c00155d5c930fa1af995e /templates/interfaces/bridge/node.def
parent8989b47af4fbf6c980003dfe6b721130044b0d6a (diff)
downloadvyatta-cfg-system-fab23c4e4b7e5566e43ccbaa9f4dbc7d1b60fc69.tar.gz
vyatta-cfg-system-fab23c4e4b7e5566e43ccbaa9f4dbc7d1b60fc69.zip
Fix Bug 5064 can't delete bridge group and membership in one commit
* fix this for eth, eth.vif, bond, bond.vif interfaces * also, bridge-group code for bonding interfaces wasn't changed with commit ec080f99 that re-strucutred bridging code in eth and eth.vifs to fix bug 4708. bridge-group code for bond and bond.vif interfaces is now similar to the fix for 4708
Diffstat (limited to 'templates/interfaces/bridge/node.def')
-rw-r--r--templates/interfaces/bridge/node.def9
1 files changed, 5 insertions, 4 deletions
diff --git a/templates/interfaces/bridge/node.def b/templates/interfaces/bridge/node.def
index a7d82012..55c961ba 100644
--- a/templates/interfaces/bridge/node.def
+++ b/templates/interfaces/bridge/node.def
@@ -8,10 +8,11 @@ syntax:expression: pattern $VAR(@) "^br[0-9]+$" ; "Must be (br0 - br999)"
create: sudo brctl addbr $VAR(@)
sudo ip link set $VAR(@) up
-delete: if [ -n "`ls /sys/class/net/$VAR(@)/brif`" ]; then
- echo "Interfaces are still assigned to bridge $VAR(@)";
- exit 1;
- fi;
+delete: if ! /opt/vyatta/sbin/vyatta-bridgegroup-depedency.pl \
+ --no-interfaces-assigned \
+ --bridge-interface="$VAR(@)"; then \
+ exit 1
+ fi
sudo ip link set $VAR(@) down;
sudo brctl delbr $VAR(@);