summaryrefslogtreecommitdiff
path: root/templates/protocols/static/interface-route
diff options
context:
space:
mode:
Diffstat (limited to 'templates/protocols/static/interface-route')
-rw-r--r--templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def4
1 files changed, 1 insertions, 3 deletions
diff --git a/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def b/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def
index 7582362d..c22c9305 100644
--- a/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def
+++ b/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def
@@ -7,12 +7,10 @@ allowed: local -a array
array=( /sys/class/net/* )
echo -n ${array[@]##*/}
-delete: touch /tmp/static.$PPID
-end: if [ -f "/tmp/static.$PPID" ]; then
+end: if [ ${COMMIT_ACTION} = 'DELETE' ]; then
vyatta-vtysh -c "configure terminal" \
-c "no ip route $VAR(../@) $VAR(@)";
- rm /tmp/static.$PPID;
else
if [ -n "$VAR(./distance/@)" ]; then
DIST="$VAR(./distance/@)";