diff options
author | Daniil Baturin <daniil@baturin.org> | 2015-03-24 19:34:39 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2015-03-24 19:34:39 +0100 |
commit | 86f5b7e0ded02ff461f8c8039152484343c2ef6f (patch) | |
tree | afed97b4d4992f31a2df30efd49d1d055bcacc94 /templates/protocols | |
parent | 6553a09ea3978af2ed0a43fc41bdc99d1cd2be9a (diff) | |
download | vyatta-cfg-quagga-86f5b7e0ded02ff461f8c8039152484343c2ef6f.tar.gz vyatta-cfg-quagga-86f5b7e0ded02ff461f8c8039152484343c2ef6f.zip |
Bug #521: save quagga daemon configs to /opt/vyatta/etc/quagga at commit time.
Diffstat (limited to 'templates/protocols')
-rw-r--r-- | templates/protocols/bgp/node.def | 3 | ||||
-rw-r--r-- | templates/protocols/ospf/node.def | 3 | ||||
-rw-r--r-- | templates/protocols/ospfv3/node.def | 1 | ||||
-rw-r--r-- | templates/protocols/rip/node.def | 6 | ||||
-rw-r--r-- | templates/protocols/ripng/node.def | 7 | ||||
-rw-r--r-- | templates/protocols/static/node.def | 7 |
6 files changed, 26 insertions, 1 deletions
diff --git a/templates/protocols/bgp/node.def b/templates/protocols/bgp/node.def index 39bb583e..08c0a91a 100644 --- a/templates/protocols/bgp/node.def +++ b/templates/protocols/bgp/node.def @@ -9,4 +9,7 @@ syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294 ; \ end: if [ -z "$VAR(.)" ] || [ "$COMMIT_ACTION" != DELETE ]; then /opt/vyatta/sbin/vyatta-bgp.pl --main + vtysh -d bgpd -c 'sh run' > /opt/vyatta/etc/quagga/bgpd.conf + else + rm -f /opt/vyatta/etc/quagga/bgpd.conf fi diff --git a/templates/protocols/ospf/node.def b/templates/protocols/ospf/node.def index be8a8111..613aee78 100644 --- a/templates/protocols/ospf/node.def +++ b/templates/protocols/ospf/node.def @@ -12,4 +12,7 @@ begin: if [ "$COMMIT_ACTION" != DELETE ]; then end: if [ "$COMMIT_ACTION" == DELETE ]; then vtysh -c "configure terminal" -c "router ospf" -c "no ospf router-id" vtysh -c "configure terminal" -c "no router ospf" + rm -f /opt/vyatta/etc/quagga/ospfd.conf + else + vtysh -d ospfd -c 'sh run' > /opt/vyatta/etc/quagga/ospfd.conf fi diff --git a/templates/protocols/ospfv3/node.def b/templates/protocols/ospfv3/node.def index 56655199..e7d11d96 100644 --- a/templates/protocols/ospfv3/node.def +++ b/templates/protocols/ospfv3/node.def @@ -8,6 +8,7 @@ begin: if [ "$COMMIT_ACTION" != DELETE ]; then vtysh -c "configure terminal" -c "router ospf6" \ -c "no router-id" fi + vtysh -d ospf6d -c 'sh run' > /opt/vyatta/etc/quagga/ospf6d.conf fi end: if [ "$COMMIT_ACTION" == DELETE ]; then vtysh -c "configure terminal" -c "router ospf6" -c "no router-id" diff --git a/templates/protocols/rip/node.def b/templates/protocols/rip/node.def index b5f02e5c..edd3d2f7 100644 --- a/templates/protocols/rip/node.def +++ b/templates/protocols/rip/node.def @@ -2,3 +2,9 @@ priority: 650 help: Routing Information Protocol (RIP) parameters create: vtysh -c "configure terminal" -c "router rip" delete: vtysh -c "configure terminal" -c "no router rip" +end: + if [ "$COMMIT_ACTION" != "DELETE" ]; then + vtysh -d ripd -c 'sh run' > /opt/vyatta/etc/quagga/ripd.conf + else + rm -f /opt/vyatta/etc/quagga/ripd.conf + fi diff --git a/templates/protocols/ripng/node.def b/templates/protocols/ripng/node.def index d4f228b0..6f12edce 100644 --- a/templates/protocols/ripng/node.def +++ b/templates/protocols/ripng/node.def @@ -2,3 +2,10 @@ priority: 660 help: Routing Information Protocol (RIPng) parameters create: vtysh -c "configure terminal" -c "router ripng" delete: vtysh -c "configure terminal" -c "no router ripng" +end: + if [ "$COMMIT_ACTION" != "DELETE" ]; then + vtysh -d ripngd -c 'sh run' > /opt/vyatta/etc/quagga/ripngd.conf + else + rm -f /opt/vyatta/etc/quagga/ripngd.conf + fi + diff --git a/templates/protocols/static/node.def b/templates/protocols/static/node.def index 8833f277..57304d7c 100644 --- a/templates/protocols/static/node.def +++ b/templates/protocols/static/node.def @@ -1,4 +1,9 @@ priority: 450 help: static route parameters - +end: + if [ "$COMMIT_ACTION" != "DELETE" ]; then + vtysh -d zebra -c 'sh run' > /opt/vyatta/etc/quagga/zebra.conf + else + rm -f /opt/vyatta/etc/quagga/zebra.conf + fi |