diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2009-08-12 17:36:28 -0700 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2009-08-12 17:36:28 -0700 |
commit | c297e0cd2aad7d2919c11edeca7c0f736ef86ba4 (patch) | |
tree | e4fc6f279c7dd88fb860d031a97b452617f4b947 /templates/protocols/static/interface-route | |
parent | 56b83235e1a47fea48fb14715ae0339c1526ea8f (diff) | |
download | vyatta-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/interface-route')
-rw-r--r-- | templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def | 29 | ||||
-rw-r--r-- | templates/protocols/static/interface-route/node.tag/next-hop-interface/node.tag/disable/node.def | 1 |
2 files changed, 20 insertions, 10 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 cd739481..d98a223b 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 @@ -6,13 +6,22 @@ help: Set the next-hop interface allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all -end: if [ ${COMMIT_ACTION} = 'DELETE' ]; then - vyatta-vtysh -c "configure terminal" \ - -c "no ip route $VAR(../@) $VAR(@)"; - 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 + vyatta-vtysh -c "configure terminal" \ + -c "no ip route $VAR(../@) $VAR(@)" + else + if [[ -n "$VAR(./distance/@)" ]] + then + DIST="$VAR(./distance/@)" + fi + vyatta-vtysh -c "configure terminal" \ + -c "ip route $VAR(../@) $VAR(@) $DIST"; + fi + else + vyatta-vtysh -c "configure terminal" \ + -c "no ip route $VAR(../@) $VAR(@)" + fi diff --git a/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.tag/disable/node.def b/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.tag/disable/node.def new file mode 100644 index 00000000..92f2ba51 --- /dev/null +++ b/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.tag/disable/node.def @@ -0,0 +1 @@ +help: Disable IPv4 interface static route |