diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/protocols/static/route/node.tag/next-hop/node.def | 10 | ||||
-rw-r--r-- | templates/protocols/static/route/node.tag/next-hop/node.tag/next-hop-interface/node.def | 3 |
2 files changed, 10 insertions, 3 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 e5106b02..0c98eb5f 100644 --- a/templates/protocols/static/route/node.tag/next-hop/node.def +++ b/templates/protocols/static/route/node.tag/next-hop/node.def @@ -18,10 +18,14 @@ end: else if [[ -n "$VAR(./distance/@)" ]] then - DIST="$VAR(./distance/@)" + DIST="$VAR(./distance/@)" fi - vtysh -c "configure terminal" \ - -c "ip route $VAR(../@) $VAR(@) $DIST"; + if [[ -n "$VAR(./next-hop-interface/@)" ]] + then + NHINT="$VAR(./next-hop-interface/@)" + fi + vtysh -c "configure terminal" \ + -c "ip route $VAR(../@) $VAR(@) $NHINT $DIST"; fi else if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl \ diff --git a/templates/protocols/static/route/node.tag/next-hop/node.tag/next-hop-interface/node.def b/templates/protocols/static/route/node.tag/next-hop/node.tag/next-hop-interface/node.def new file mode 100644 index 00000000..ad045d40 --- /dev/null +++ b/templates/protocols/static/route/node.tag/next-hop/node.tag/next-hop-interface/node.def @@ -0,0 +1,3 @@ +type: txt +help: network interface +allowed: sh -c "${vyos_completion_dir}/list_interfaces.py" |