From 1a7d69a1db8249754ff3a0b43270fb6bfb5d6764 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 5 Feb 2009 11:43:31 -0800 Subject: Manage daemons better 1. Shutdown bgp on last neighbor removed 2. use daemon name consistently 3. change options to watchquagga --- templates/protocols/bgp/node.def | 6 +++++- templates/protocols/ospf/node.def | 4 ++-- templates/protocols/rip/node.def | 4 ++-- templates/protocols/ripng/node.def | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) (limited to 'templates') diff --git a/templates/protocols/bgp/node.def b/templates/protocols/bgp/node.def index ef80d812..ca1ae005 100644 --- a/templates/protocols/bgp/node.def +++ b/templates/protocols/bgp/node.def @@ -6,10 +6,14 @@ syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294 ; \ "AS number must be between 1 and 4294967294" create: if [ $(pgrep -c -x vyatta-bgpd) -eq 0 ] - then /opt/vyatta/sbin/vyatta-protocol start bgp + then ${vyatta_sbindir}/vyatta-protocol start bgpd fi 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(@)" + if ! ${vyatta_sbindir}/vyatta-check-typeless-node.pl "protocols bgp" + then ${vyatta_sbindir}/vyatta-protocol stop bgpd + fi + diff --git a/templates/protocols/ospf/node.def b/templates/protocols/ospf/node.def index 25ef78e3..5405abac 100644 --- a/templates/protocols/ospf/node.def +++ b/templates/protocols/ospf/node.def @@ -1,5 +1,5 @@ help: Configure Open Shortest Path First protocol (OSPF) parameters -create: /opt/vyatta/sbin/vyatta-protocol start ospf +create: /opt/vyatta/sbin/vyatta-protocol start ospfd vyatta-vtysh -c "configure terminal" -c "router ospf" delete: vyatta-vtysh -c "configure terminal" -c "no router ospf" - /opt/vyatta/sbin/vyatta-protocol stop ospf + /opt/vyatta/sbin/vyatta-protocol stop ospfd diff --git a/templates/protocols/rip/node.def b/templates/protocols/rip/node.def index f1a08cc5..a77bdb30 100644 --- a/templates/protocols/rip/node.def +++ b/templates/protocols/rip/node.def @@ -1,7 +1,7 @@ help: Configure Routing Information Protocol (RIP) parameters -create: /opt/vyatta/sbin/vyatta-protocol start rip +create: /opt/vyatta/sbin/vyatta-protocol start ripd vyatta-vtysh -c "configure terminal" -c "router rip" delete: vyatta-vtysh -c "configure terminal" -c "no router rip" - /opt/vyatta/sbin/vyatta-protocol stop rip + /opt/vyatta/sbin/vyatta-protocol stop ripd diff --git a/templates/protocols/ripng/node.def b/templates/protocols/ripng/node.def index efe56ba3..18735607 100644 --- a/templates/protocols/ripng/node.def +++ b/templates/protocols/ripng/node.def @@ -1,5 +1,5 @@ help: Configure Routing Information Protocol (RIPng) parameters -create: /opt/vyatta/sbin/vyatta-protocol start ripng +create: /opt/vyatta/sbin/vyatta-protocol start ripngd vyatta-vtysh -c "configure terminal" -c "router ripng" delete: vyatta-vtysh -c "configure terminal" -c "no router ripng" - /opt/vyatta/sbin/vyatta-protocol stop ripng + /opt/vyatta/sbin/vyatta-protocol stop ripngd -- cgit v1.2.3