summaryrefslogtreecommitdiff
path: root/templates/protocols/bgp/node.def
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-02-04 13:58:41 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-02-04 15:13:44 -0800
commit7158009fa019bb9eb5b871750e3658590b3a122f (patch)
treeb14de3ba75a42a218bf9e768bf229cc3992604c3 /templates/protocols/bgp/node.def
parentde5866ef8e4c4249448a9e0d962f3f957c954ccd (diff)
downloadvyatta-cfg-quagga-7158009fa019bb9eb5b871750e3658590b3a122f.tar.gz
vyatta-cfg-quagga-7158009fa019bb9eb5b871750e3658590b3a122f.zip
Protocol daemon management
Bug 3828 Start protocols from configuration system, and use watchquagga to restart protocol daemons after failure
Diffstat (limited to 'templates/protocols/bgp/node.def')
-rw-r--r--templates/protocols/bgp/node.def15
1 files changed, 10 insertions, 5 deletions
diff --git a/templates/protocols/bgp/node.def b/templates/protocols/bgp/node.def
index 69c2daab..ef80d812 100644
--- a/templates/protocols/bgp/node.def
+++ b/templates/protocols/bgp/node.def
@@ -2,9 +2,14 @@ tag:
type: u32
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"
-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"
+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
+ 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(@)"
+