summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorslioch <slioch@eng-140.vyatta.com>2009-03-04 11:21:14 -0800
committerslioch <slioch@eng-140.vyatta.com>2009-03-04 11:21:14 -0800
commitcb9c343db46dd15b734e477d9adba343827e0360 (patch)
tree61012416aeaeb86b5bbb9dcd6ddf9b535ba407af
parent73073b1992ba40d383ebd3bcad5760295e310227 (diff)
downloadvyatta-cfg-quagga-cb9c343db46dd15b734e477d9adba343827e0360.tar.gz
vyatta-cfg-quagga-cb9c343db46dd15b734e477d9adba343827e0360.zip
clean up other static route commands to remove references to /tmp/ pellets and to use environment variable set via new cli.
-rw-r--r--templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def4
-rw-r--r--templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def5
-rw-r--r--templates/protocols/static/route/node.tag/blackhole/node.def5
-rw-r--r--templates/protocols/static/route6/node.tag/blackhole/node.def4
-rw-r--r--templates/protocols/static/route6/node.tag/next-hop/node.def4
5 files changed, 5 insertions, 17 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/@)";
diff --git a/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def b/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def
index 5321c619..a7e1744a 100644
--- a/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def
+++ b/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def
@@ -7,12 +7,9 @@ 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 ipv6 route $VAR(../@) $VAR(@)";
- rm /tmp/static.$PPID;
else
if [ -n "$VAR(./distance/@)" ]; then
DIST="$VAR(./distance/@)";
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/route6/node.tag/blackhole/node.def b/templates/protocols/static/route6/node.tag/blackhole/node.def
index bd8601d5..a4066ee6 100644
--- a/templates/protocols/static/route6/node.tag/blackhole/node.def
+++ b/templates/protocols/static/route6/node.tag/blackhole/node.def
@@ -1,10 +1,8 @@
help: Set to silently discard pkts when matched
-delete:expression: "touch /tmp/static.$PPID"
-end: if [ -f "/tmp/static.$PPID" ]; then
+end: if [ ${COMMIT_ACTION} = 'DELETE' ]; then
vyatta-vtysh -c "configure terminal" \
-c "no ipv6 route $VAR(../@) null0";
- rm /tmp/static.$PPID;
else
if [ -n "$VAR(./distance/@)" ]; then
DIST="$VAR(./distance/@)";
diff --git a/templates/protocols/static/route6/node.tag/next-hop/node.def b/templates/protocols/static/route6/node.tag/next-hop/node.def
index 3f9cd440..e58c4fcc 100644
--- a/templates/protocols/static/route6/node.tag/next-hop/node.def
+++ b/templates/protocols/static/route6/node.tag/next-hop/node.def
@@ -1,12 +1,10 @@
tag:
type: ipv6
help: Set the next-hop IPv6 router
-delete: touch /tmp/static.$PPID
-end: if [ -f "/tmp/static.$PPID" ]; then
+end: if [ ${COMMIT_ACTION} = 'DELETE' ]; then
if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl "$VAR(../@)" "$VAR(@)"; then
vyatta-vtysh -c "configure terminal" -c "no ipv6 route $VAR(../@) $VAR(@)" ;
fi;
- rm /tmp/static.$PPID;
else
if [ -n "$VAR(./distance/@)" ]; then
DIST="$VAR(./distance/@)";