summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-10-14 19:01:24 +0200
committerDaniil Baturin <daniil@baturin.org>2018-10-14 19:01:24 +0200
commitad89b9a497abcb66ad4312a633b4f279c6f49f8b (patch)
tree565120f54218c0cb148353ef6b1bc56ba7a8aa38 /templates
parent12c9b5870d2ca82885d1d78266efcd5feba5ee3c (diff)
downloadvyatta-cfg-system-ad89b9a497abcb66ad4312a633b4f279c6f49f8b.tar.gz
vyatta-cfg-system-ad89b9a497abcb66ad4312a633b4f279c6f49f8b.zip
T900: handle the case when a bridge and tunnel bridge group are removed in the same commit.
Diffstat (limited to 'templates')
-rw-r--r--templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/bridge/node.def6
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/bridge/node.def b/templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/bridge/node.def
index 85666c41..84d2c983 100644
--- a/templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/bridge/node.def
+++ b/templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/bridge/node.def
@@ -13,4 +13,8 @@ create:
echo interfaces tunnel $VAR(../../../../@) bridge-group bridge $VAR(@): tunnel encapsulation type must be gre-bridge
exit 1
fi
-delete: sudo brctl delif $VAR(@) $VAR(../../../../@)
+delete: if [ -d /sys/class/net/$VAR(@) ]; then
+ sudo brctl delif $VAR(@) $VAR(../../../../@)
+ else
+ exit 0
+ fi