diff options
Diffstat (limited to 'templates/protocols/static/route')
-rw-r--r-- | templates/protocols/static/route/node.tag/blackhole/node.def | 5 | ||||
-rw-r--r-- | templates/protocols/static/route/node.tag/next-hop/node.def | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/templates/protocols/static/route/node.tag/blackhole/node.def b/templates/protocols/static/route/node.tag/blackhole/node.def index f3844833..14375e0e 100644 --- a/templates/protocols/static/route/node.tag/blackhole/node.def +++ b/templates/protocols/static/route/node.tag/blackhole/node.def @@ -1,11 +1,8 @@ help: Set to silently discard pkts when matched -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(../@) null0"; - rm /tmp/static.$PPID; else if [ -n "$VAR(./distance/@)" ]; then DIST="$VAR(./distance/@)"; 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 e631df83..c8632ed8 100644 --- a/templates/protocols/static/route/node.tag/next-hop/node.def +++ b/templates/protocols/static/route/node.tag/next-hop/node.def @@ -1,8 +1,7 @@ tag: type: ipv4 help: Set the next-hop router -delete: touch /tmp/static.$PPID -end: if [[ -f /tmp/static.$PPID ]] +end: if [[ ${COMMIT_ACTION} = 'DELETE' ]] then if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl \ "$VAR(../@)" "$VAR(@)" @@ -10,7 +9,6 @@ end: if [[ -f /tmp/static.$PPID ]] vyatta-vtysh -c "configure terminal" \ -c "no ip route $VAR(../@) $VAR(@)" fi - rm -f /tmp/static.$PPID else if [[ -n "$VAR(./distance/@)" ]] then |