summaryrefslogtreecommitdiff
path: root/templates/protocols/static/interface-route6
diff options
context:
space:
mode:
Diffstat (limited to 'templates/protocols/static/interface-route6')
-rw-r--r--templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def29
-rw-r--r--templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.tag/disable/node.def1
2 files changed, 20 insertions, 10 deletions
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 052e1a2f..d1c5e21f 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
@@ -5,13 +5,22 @@ help: Set the next-hop interface
# but syntax accepts any interface since it may exist later (ppp etc)
allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all
-end: if [ ${COMMIT_ACTION} = 'DELETE' ]; then
- vyatta-vtysh -c "configure terminal" \
- -c "no ipv6 route $VAR(../@) $VAR(@)";
- else
- if [ -n "$VAR(./distance/@)" ]; then
- DIST="$VAR(./distance/@)";
- fi;
- vyatta-vtysh -c "configure terminal" \
- -c "ipv6 route $VAR(../@) $VAR(@) $DIST";
- fi;
+end:
+ if [[ -z "$VAR(./disable)" ]]
+ then
+ if [[ ${COMMIT_ACTION} = 'DELETE' ]]
+ then
+ vyatta-vtysh -c "configure terminal" \
+ -c "no ipv6 route $VAR(../@) $VAR(@)"
+ else
+ if [[ -n "$VAR(./distance/@)" ]]
+ then
+ DIST="$VAR(./distance/@)"
+ fi
+ vyatta-vtysh -c "configure terminal" \
+ -c "ipv6 route $VAR(../@) $VAR(@) $DIST";
+ fi
+ else
+ vyatta-vtysh -c "configure terminal" \
+ -c "no ipv6 route $VAR(../@) $VAR(@)"
+ fi
diff --git a/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.tag/disable/node.def b/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.tag/disable/node.def
new file mode 100644
index 00000000..bc4b57e6
--- /dev/null
+++ b/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.tag/disable/node.def
@@ -0,0 +1 @@
+help: Disable IPv6 interface static route