diff options
-rw-r--r-- | templates/interfaces/tunnel/node.tag/parameters/ip/bridge-group/bridge/node.def | 6 |
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 |