diff options
Diffstat (limited to 'templates/interfaces/bridge/node.def')
-rw-r--r-- | templates/interfaces/bridge/node.def | 9 |
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(@); |