summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def23
1 files changed, 12 insertions, 11 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 74e5a8a4..da7b7864 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
@@ -32,15 +32,16 @@ syntax:expression: exec " \
fi ; \
fi ; "
-delete:expression: "touch /tmp/static.$PPID"
-
-end:expression: "if [ -f \"/tmp/static.$PPID\" ]; 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/@)\"; \
- fi; \
- vyatta-vtysh -c \"configure terminal\" -c \"ip route $VAR(../@) $VAR(@) $DIST \" ; \
- fi; "
+delete: touch /tmp/static.$PPID
+end: if [ -f "/tmp/static.$PPID" ]; 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/@)";
+ fi;
+ vyatta-vtysh -c "configure terminal" \
+ -c "ip route $VAR(../@) $VAR(@) $DIST";
+ fi;