From 2b7b40b018efdf0fbad1a2c1e37f70da30aa3d8b Mon Sep 17 00:00:00 2001 From: John Southworth Date: Mon, 28 Mar 2011 18:13:10 -0500 Subject: Bugfix 6958: only call cleanup script for tunnel modules on the last sibling deletion --- templates/interfaces/tunnel/node.def | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'templates') 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 -- cgit v1.2.3