summaryrefslogtreecommitdiff
path: root/templates/protocols/static
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@uffda.(none)>2007-10-16 14:15:04 -0700
committerStig Thormodsrud <stig@uffda.(none)>2007-10-16 14:15:04 -0700
commit281fcfb8dad9b66f027c39476a05aa5eff89fce1 (patch)
treeb53963a6597304daffa6b2f1e9bae7f5722c7956 /templates/protocols/static
parent83331a0a334130cc438805c124fd05d93eddd5d0 (diff)
downloadvyatta-cfg-quagga-281fcfb8dad9b66f027c39476a05aa5eff89fce1.tar.gz
vyatta-cfg-quagga-281fcfb8dad9b66f027c39476a05aa5eff89fce1.zip
- Fix "set system gateway".
- Add basic support for static routes.
Diffstat (limited to 'templates/protocols/static')
-rw-r--r--templates/protocols/static/interface-route/node.def4
-rw-r--r--templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def9
-rw-r--r--templates/protocols/static/interface-route/node.tag/node.def2
-rw-r--r--templates/protocols/static/node.def3
-rw-r--r--templates/protocols/static/route/node.def4
-rw-r--r--templates/protocols/static/route/node.tag/next-hop/node.def4
-rw-r--r--templates/protocols/static/route/node.tag/node.def1
7 files changed, 27 insertions, 0 deletions
diff --git a/templates/protocols/static/interface-route/node.def b/templates/protocols/static/interface-route/node.def
new file mode 100644
index 00000000..035417e3
--- /dev/null
+++ b/templates/protocols/static/interface-route/node.def
@@ -0,0 +1,4 @@
+tag:
+type: ipv4net
+help: "Configure an interface-based static route"
+syntax: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $(@)"
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
new file mode 100644
index 00000000..1417a905
--- /dev/null
+++ b/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def
@@ -0,0 +1,9 @@
+type: txt
+help: "Configure the next-hop interface"
+syntax: exec " \
+ if [ -z \"`ip addr | grep $(@) `\" ]; then \
+ echo ethernet interface $(@) doesn\\'t exist on this system ; \
+ exit 1 ; \
+ fi ; "
+create: "/usr/bin/vtysh -c \"configure terminal\" -c \"ip route $(../@) $(@)\" "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"no ip route $(../@) $(@)\" "
diff --git a/templates/protocols/static/interface-route/node.tag/node.def b/templates/protocols/static/interface-route/node.tag/node.def
new file mode 100644
index 00000000..3a5b62ec
--- /dev/null
+++ b/templates/protocols/static/interface-route/node.tag/node.def
@@ -0,0 +1,2 @@
+help: "IP network"
+
diff --git a/templates/protocols/static/node.def b/templates/protocols/static/node.def
new file mode 100644
index 00000000..6c673799
--- /dev/null
+++ b/templates/protocols/static/node.def
@@ -0,0 +1,3 @@
+help: "Static route configuration"
+
+
diff --git a/templates/protocols/static/route/node.def b/templates/protocols/static/route/node.def
new file mode 100644
index 00000000..63e2c6c7
--- /dev/null
+++ b/templates/protocols/static/route/node.def
@@ -0,0 +1,4 @@
+tag:
+type: ipv4net
+help: "Configure a static route"
+syntax: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $(@)"
diff --git a/templates/protocols/static/route/node.tag/next-hop/node.def b/templates/protocols/static/route/node.tag/next-hop/node.def
new file mode 100644
index 00000000..0cb5e367
--- /dev/null
+++ b/templates/protocols/static/route/node.tag/next-hop/node.def
@@ -0,0 +1,4 @@
+type: ipv4
+help: "Configure the next-hop router"
+create: "/usr/bin/vtysh -c \"configure terminal\" -c \"ip route $(../@) $(@)\" "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"no ip route $(../@) $(@)\" "
diff --git a/templates/protocols/static/route/node.tag/node.def b/templates/protocols/static/route/node.tag/node.def
new file mode 100644
index 00000000..e64fee84
--- /dev/null
+++ b/templates/protocols/static/route/node.tag/node.def
@@ -0,0 +1 @@
+help: "IP network"