summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-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