From ad89b9a497abcb66ad4312a633b4f279c6f49f8b Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Sun, 14 Oct 2018 19:01:24 +0200 Subject: T900: handle the case when a bridge and tunnel bridge group are removed in the same commit. --- .../tunnel/node.tag/parameters/ip/bridge-group/bridge/node.def | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'templates') 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 -- cgit v1.2.3