summaryrefslogtreecommitdiff
path: root/templates/protocols/static/route
diff options
context:
space:
mode:
authorMohit Mehta <mohit.mehta@vyatta.com>2009-08-12 17:36:28 -0700
committerMohit Mehta <mohit.mehta@vyatta.com>2009-08-12 17:36:28 -0700
commitc297e0cd2aad7d2919c11edeca7c0f736ef86ba4 (patch)
treee4fc6f279c7dd88fb860d031a97b452617f4b947 /templates/protocols/static/route
parent56b83235e1a47fea48fb14715ae0339c1526ea8f (diff)
downloadvyatta-cfg-quagga-c297e0cd2aad7d2919c11edeca7c0f736ef86ba4.tar.gz
vyatta-cfg-quagga-c297e0cd2aad7d2919c11edeca7c0f736ef86ba4.zip
add support for disabling ipv6 and ipv6 static routes in config
Diffstat (limited to 'templates/protocols/static/route')
-rw-r--r--templates/protocols/static/route/node.tag/next-hop/node.def43
-rw-r--r--templates/protocols/static/route/node.tag/next-hop/node.tag/disable/node.def1
2 files changed, 28 insertions, 16 deletions
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 c8632ed8..943857f8 100644
--- a/templates/protocols/static/route/node.tag/next-hop/node.def
+++ b/templates/protocols/static/route/node.tag/next-hop/node.def
@@ -1,19 +1,30 @@
tag:
type: ipv4
help: Set the next-hop router
-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 ip route $VAR(../@) $VAR(@)"
- fi
- else
- if [[ -n "$VAR(./distance/@)" ]]
- then
- DIST="$VAR(./distance/@)"
- fi
- vyatta-vtysh -c "configure terminal" \
- -c "ip route $VAR(../@) $VAR(@) $DIST";
- fi
+end:
+ if [[ -z "$VAR(./disable)" ]]
+ then
+ if [[ ${COMMIT_ACTION} = 'DELETE' ]]
+ then
+ if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl \
+ "$VAR(../@)" "$VAR(@)"
+ then
+ vyatta-vtysh -c "configure terminal" \
+ -c "no ip route $VAR(../@) $VAR(@)"
+ fi
+ else
+ if [[ -n "$VAR(./distance/@)" ]]
+ then
+ DIST="$VAR(./distance/@)"
+ fi
+ vyatta-vtysh -c "configure terminal" \
+ -c "ip route $VAR(../@) $VAR(@) $DIST";
+ fi
+ else
+ if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl \
+ "$VAR(../@)" "$VAR(@)"
+ then
+ vyatta-vtysh -c "configure terminal" \
+ -c "no ip route $VAR(../@) $VAR(@)"
+ fi
+ fi
diff --git a/templates/protocols/static/route/node.tag/next-hop/node.tag/disable/node.def b/templates/protocols/static/route/node.tag/next-hop/node.tag/disable/node.def
new file mode 100644
index 00000000..de3afda4
--- /dev/null
+++ b/templates/protocols/static/route/node.tag/next-hop/node.tag/disable/node.def
@@ -0,0 +1 @@
+help: Disable IPv4 next-hop static route