summaryrefslogtreecommitdiff
path: root/templates/interfaces/tunnel/node.def
diff options
context:
space:
mode:
Diffstat (limited to 'templates/interfaces/tunnel/node.def')
-rw-r--r--templates/interfaces/tunnel/node.def9
1 files changed, 6 insertions, 3 deletions
diff --git a/templates/interfaces/tunnel/node.def b/templates/interfaces/tunnel/node.def
index f4d53c1a..c8670a16 100644
--- a/templates/interfaces/tunnel/node.def
+++ b/templates/interfaces/tunnel/node.def
@@ -39,8 +39,11 @@ delete: ip link set $VAR(@) down
else
ip tunnel del $VAR(@) mode $VAR(./encapsulation/@)
fi
-end: if [ ${COMMIT_ACTION} = "DELETE" ]; then
- /opt/vyatta/sbin/vyatta-tunnel-cleanup
- fi
+end: if [ "$COMMIT_SIBLING_POSITION" = "LAST" ] || \
+ [ "$COMMIT_SIBLING_POSITION" = "FIRSTLAST" ] ; then
+ if [ ${COMMIT_ACTION} = "DELETE" ]; then
+ /opt/vyatta/sbin/vyatta-tunnel-cleanup
+ fi
+ fi