diff options
Diffstat (limited to 'templates/protocols/ripng/redistribute/static')
3 files changed, 26 insertions, 0 deletions
diff --git a/templates/protocols/ripng/redistribute/static/metric/node.def b/templates/protocols/ripng/redistribute/static/metric/node.def new file mode 100644 index 00000000..ad569327 --- /dev/null +++ b/templates/protocols/ripng/redistribute/static/metric/node.def @@ -0,0 +1,3 @@ +type: u32 +help: Set metric for redistributed routes +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 16; "metric must be between 1 and 16" diff --git a/templates/protocols/ripng/redistribute/static/node.def b/templates/protocols/ripng/redistribute/static/node.def new file mode 100644 index 00000000..26f9fa09 --- /dev/null +++ b/templates/protocols/ripng/redistribute/static/node.def @@ -0,0 +1,20 @@ +help: Set to redistribute static routes + +delete: touch /tmp/rip-redist-static.$PPID + +end: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ripng" \ + -c "no redistribute static"; + if [ -f "/tmp/rip-redist-static.$PPID" ]; then + rm -rf /tmp/rip-redist-static.$PPID; + else + if [ -n "$VAR(./metric/@)" ]; then + COND="metric $VAR(./metric/@)"; + fi; + if [ -n "$VAR(./route-map/@)" ]; then + COND="$COND route-map $VAR(./route-map/@)"; + fi; + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ripng" \ + -c "redistribute static $COND"; + fi; diff --git a/templates/protocols/ripng/redistribute/static/route-map/node.def b/templates/protocols/ripng/redistribute/static/route-map/node.def new file mode 100644 index 00000000..3f570311 --- /dev/null +++ b/templates/protocols/ripng/redistribute/static/route-map/node.def @@ -0,0 +1,3 @@ +type: txt +help: Set route map reference +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" |