From f2d03803e6f10a430c1dc17436abd18f74b87a4d Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Fri, 8 Aug 2008 11:58:30 -0700 Subject: Fix syntax errors found by check_tmpl. --- .../static/route/node.tag/blackhole/node.def | 24 +++++++++++++--------- .../static/route/node.tag/next-hop/node.def | 8 +++++--- 2 files changed, 19 insertions(+), 13 deletions(-) (limited to 'templates') diff --git a/templates/protocols/static/route/node.tag/blackhole/node.def b/templates/protocols/static/route/node.tag/blackhole/node.def index 930ecfa3..f3844833 100644 --- a/templates/protocols/static/route/node.tag/blackhole/node.def +++ b/templates/protocols/static/route/node.tag/blackhole/node.def @@ -1,11 +1,15 @@ help: Set to silently discard pkts when matched -delete:expression: "touch /tmp/static.$PPID" -end:expression: "if [ -f \"/tmp/static.$PPID\" ]; then \ - vyatta-vtysh -c \"configure terminal\" -c \"no ip route $VAR(../@) null0\" ; \ - rm /tmp/static.$PPID; \ - else \ - if [ -n \"$VAR(./distance/@)\" ]; then \ - DIST=\"$VAR(./distance/@)\"; \ - fi; \ - vyatta-vtysh -c \"configure terminal\" -c \"ip route $VAR(../@) null0 $DIST \" ; \ - fi; " + +delete: touch /tmp/static.$PPID + +end: if [ -f "/tmp/static.$PPID" ]; then + vyatta-vtysh -c "configure terminal" \ + -c "no ip route $VAR(../@) null0"; + rm /tmp/static.$PPID; + else + if [ -n "$VAR(./distance/@)" ]; then + DIST="$VAR(./distance/@)"; + fi; + vyatta-vtysh -c "configure terminal" \ + -c "ip route $VAR(../@) null0 $DIST"; + fi; diff --git a/templates/protocols/static/route/node.tag/next-hop/node.def b/templates/protocols/static/route/node.tag/next-hop/node.def index f93b1270..e631df83 100644 --- a/templates/protocols/static/route/node.tag/next-hop/node.def +++ b/templates/protocols/static/route/node.tag/next-hop/node.def @@ -5,9 +5,10 @@ delete: touch /tmp/static.$PPID end: if [[ -f /tmp/static.$PPID ]] then if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl \ - "$VAR(../@)" "$VAR(@)" + "$VAR(../@)" "$VAR(@)" then - vyatta-vtysh -c "configure terminal" -c "no ip route $VAR(../@) $VAR(@)" + vyatta-vtysh -c "configure terminal" \ + -c "no ip route $VAR(../@) $VAR(@)" fi rm -f /tmp/static.$PPID else @@ -15,5 +16,6 @@ end: if [[ -f /tmp/static.$PPID ]] then DIST="$VAR(./distance/@)" fi - vyatta-vtysh -c "configure terminal" -c "ip route $VAR(../@) $VAR(@) $DIST" ; \ + vyatta-vtysh -c "configure terminal" \ + -c "ip route $VAR(../@) $VAR(@) $DIST"; fi -- cgit v1.2.3