diff options
Diffstat (limited to 'templates/protocols/ripng/redistribute/kernel')
3 files changed, 26 insertions, 0 deletions
diff --git a/templates/protocols/ripng/redistribute/kernel/metric/node.def b/templates/protocols/ripng/redistribute/kernel/metric/node.def new file mode 100644 index 00000000..ad569327 --- /dev/null +++ b/templates/protocols/ripng/redistribute/kernel/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/kernel/node.def b/templates/protocols/ripng/redistribute/kernel/node.def new file mode 100644 index 00000000..6b233f87 --- /dev/null +++ b/templates/protocols/ripng/redistribute/kernel/node.def @@ -0,0 +1,20 @@ +help: Set to redistribute kernel routes + +delete: touch /tmp/rip-redist-kernel.$PPID + +end: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ripng" \ + -c "no redistribute kernel"; + if [ -f "/tmp/rip-redist-kernel.$PPID" ]; then + rm -rf /tmp/rip-redist-kernel.$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 kernel $COND"; + fi; diff --git a/templates/protocols/ripng/redistribute/kernel/route-map/node.def b/templates/protocols/ripng/redistribute/kernel/route-map/node.def new file mode 100644 index 00000000..3f570311 --- /dev/null +++ b/templates/protocols/ripng/redistribute/kernel/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" |