From a5f6345aa9876560a1ccbfca1313fdd05e7ea752 Mon Sep 17 00:00:00 2001 From: slioch Date: Thu, 19 Feb 2009 16:57:33 -0800 Subject: changes to support bgp start/stop --- templates/protocols/bgp/disable/node.def | 12 ------------ templates/protocols/bgp/node.def | 3 ++- 2 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 templates/protocols/bgp/disable/node.def (limited to 'templates/protocols') diff --git a/templates/protocols/bgp/disable/node.def b/templates/protocols/bgp/disable/node.def deleted file mode 100644 index 2795453f..00000000 --- a/templates/protocols/bgp/disable/node.def +++ /dev/null @@ -1,12 +0,0 @@ -type: bool -help: Disable BGP daemon -default: false -update: if [ $VAR(@) == "true" ]; - then sudo ${vyatta_sbindir}/vyatta-protocol stop bgpd - else sudo ${vyatta_sbindir}/vyatta-protocol start bgpd - fi -possible completions: - true Stop BGP daemon - false Start BGP daemon - -allowed: echo "true false" diff --git a/templates/protocols/bgp/node.def b/templates/protocols/bgp/node.def index 803362db..b2586eb0 100644 --- a/templates/protocols/bgp/node.def +++ b/templates/protocols/bgp/node.def @@ -4,11 +4,12 @@ help: Configure Border Gateway Protocol (BGP) parameters comp_help: \1 <1-4294967294>\tAS number syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294 ; \ "AS number must be between 1 and 4294967294" -begin: sudo /opt/vyatta/sbin/quagga-manager start bgpd +create: sudo /opt/vyatta/sbin/quagga-manager start bgpd update: vyatta-vtysh -c "configure terminal" -c "router bgp $VAR(@)" # we need to set default parameters in BGP here since we can't do it in # startup scripts as we don't know the AS number at that point update: vyatta-vtysh -c "configure terminal" -c "router bgp $VAR(@)" \ -c "bgp network import-check" delete: vyatta-vtysh -c "configure terminal" -c "no router bgp $VAR(@)" +delete: sudo /opt/vyatta/sbin/quagga-manager stop bgpd end: sudo /opt/vyatta/sbin/quagga-manager update -- cgit v1.2.3 From 2f6ceb414f9c45bb98505d2773f077c243e13e59 Mon Sep 17 00:00:00 2001 From: slioch Date: Thu, 19 Feb 2009 20:32:10 -0800 Subject: applied same changes to ospf and rip as to bgp re: start/stop router daemon hooks --- templates/protocols/ospf/node.def | 3 ++- templates/protocols/rip/node.def | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'templates/protocols') diff --git a/templates/protocols/ospf/node.def b/templates/protocols/ospf/node.def index 731d39f1..4cdf703f 100644 --- a/templates/protocols/ospf/node.def +++ b/templates/protocols/ospf/node.def @@ -1,5 +1,6 @@ help: Configure Open Shortest Path First protocol (OSPF) parameters -begin: sudo /opt/vyatta/sbin/quagga-manager start ospfd +create: sudo /opt/vyatta/sbin/quagga-manager start ospfd create: vyatta-vtysh -c "configure terminal" -c "router ospf" delete: vyatta-vtysh -c "configure terminal" -c "no router ospf" +delete: sudo /opt/vyatta/sbin/quagga-manager stop ospfd end: sudo /opt/vyatta/sbin/quagga-manager update diff --git a/templates/protocols/rip/node.def b/templates/protocols/rip/node.def index b7f085a5..2c2d300c 100644 --- a/templates/protocols/rip/node.def +++ b/templates/protocols/rip/node.def @@ -1,5 +1,6 @@ help: Configure Routing Information Protocol (RIP) parameters -begin: sudo /opt/vyatta/sbin/quagga-manager start ripd +create: sudo /opt/vyatta/sbin/quagga-manager start ripd create: vyatta-vtysh -c "configure terminal" -c "router rip" delete: vyatta-vtysh -c "configure terminal" -c "no router rip" +delete: sudo /opt/vyatta/sbin/quagga-manager stop ripd end: sudo /opt/vyatta/sbin/quagga-manager update -- cgit v1.2.3 From 91a04daa3a843bb6cff9de67437763c1dc695960 Mon Sep 17 00:00:00 2001 From: slioch Date: Thu, 19 Feb 2009 21:46:23 -0800 Subject: as per discussion with Stephen. update handles shutdown of daemon and explicit stop is not needed. Removed from delete node, but might promote end action to delete action --- templates/protocols/bgp/node.def | 1 - templates/protocols/ospf/node.def | 1 - templates/protocols/rip/node.def | 1 - 3 files changed, 3 deletions(-) (limited to 'templates/protocols') diff --git a/templates/protocols/bgp/node.def b/templates/protocols/bgp/node.def index b2586eb0..91d7261b 100644 --- a/templates/protocols/bgp/node.def +++ b/templates/protocols/bgp/node.def @@ -11,5 +11,4 @@ update: vyatta-vtysh -c "configure terminal" -c "router bgp $VAR(@)" update: vyatta-vtysh -c "configure terminal" -c "router bgp $VAR(@)" \ -c "bgp network import-check" delete: vyatta-vtysh -c "configure terminal" -c "no router bgp $VAR(@)" -delete: sudo /opt/vyatta/sbin/quagga-manager stop bgpd end: sudo /opt/vyatta/sbin/quagga-manager update diff --git a/templates/protocols/ospf/node.def b/templates/protocols/ospf/node.def index 4cdf703f..1fd39bfe 100644 --- a/templates/protocols/ospf/node.def +++ b/templates/protocols/ospf/node.def @@ -2,5 +2,4 @@ help: Configure Open Shortest Path First protocol (OSPF) parameters create: sudo /opt/vyatta/sbin/quagga-manager start ospfd create: vyatta-vtysh -c "configure terminal" -c "router ospf" delete: vyatta-vtysh -c "configure terminal" -c "no router ospf" -delete: sudo /opt/vyatta/sbin/quagga-manager stop ospfd end: sudo /opt/vyatta/sbin/quagga-manager update diff --git a/templates/protocols/rip/node.def b/templates/protocols/rip/node.def index 2c2d300c..648ecf49 100644 --- a/templates/protocols/rip/node.def +++ b/templates/protocols/rip/node.def @@ -2,5 +2,4 @@ help: Configure Routing Information Protocol (RIP) parameters create: sudo /opt/vyatta/sbin/quagga-manager start ripd create: vyatta-vtysh -c "configure terminal" -c "router rip" delete: vyatta-vtysh -c "configure terminal" -c "no router rip" -delete: sudo /opt/vyatta/sbin/quagga-manager stop ripd end: sudo /opt/vyatta/sbin/quagga-manager update -- cgit v1.2.3