summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-05-07 09:13:19 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-05-07 09:13:19 -0700
commit495f3b830b19c58ec2dc5ca1b9fee91b1d252cf7 (patch)
tree292b9d390a64703e94424f39a2eb92a38915713d
parent580b08fdb0c476cce9713f06491997c5214b7663 (diff)
downloadvyatta-cfg-quagga-495f3b830b19c58ec2dc5ca1b9fee91b1d252cf7.tar.gz
vyatta-cfg-quagga-495f3b830b19c58ec2dc5ca1b9fee91b1d252cf7.zip
Get rid of update action
There were several problems with the quagga-manager update. 1) can not have multiple end: tags in same tree path 2) can not shutdown bgp without losing policy 3) watchquagga timing races
-rwxr-xr-xscripts/quagga-manager41
-rw-r--r--templates/protocols/bgp/node.def2
-rw-r--r--templates/protocols/ospf/node.def1
-rw-r--r--templates/protocols/ospfv3/node.def1
-rw-r--r--templates/protocols/rip/node.def1
-rw-r--r--templates/protocols/ripng/node.def1
6 files changed, 1 insertions, 46 deletions
diff --git a/scripts/quagga-manager b/scripts/quagga-manager
index 77cb5f5a..ba95d5f8 100755
--- a/scripts/quagga-manager
+++ b/scripts/quagga-manager
@@ -132,51 +132,10 @@ reload_config() {
trap "" EXIT HUP INT QUIT TERM
}
-# Check if interface configuration exists for this protocol
-okay_to_stop() {
- local daemon=$1
- local proto=$(get_protocol $daemon)
- local cfg=/opt/vyatta/config/active/interfaces
-
- case $proto in
- rip|ospf)
- return $(find $cfg -type d -path "*/ip/$proto" | wc -l);;
- ripng|ospfv3)
- return $(find $cfg -type d -path "*/ipv6/$proto" | wc -l);;
- *)
- return 0;;
- esac
-}
-
-update() {
- # get list of daemons deleted and added in current transaction
- local -a deleted=( `/opt/vyatta/bin/vyatta-show-protocols deleted` )
- local -a added=( `/opt/vyatta/bin/vyatta-show-protocols added` )
-
- # nothing lost, nothing gained
- [ ${#deleted[*]} -eq 0 -a ${#added[*]} -eq 0 ] && exit 0
-
- # Stop watcher (or it will restart daemons!)
- stop watchquagga
-
- # Cleanup any daemons no longer needed
- for p in ${deleted[*]}
- do
- # Need daemon to hold state of interface
- if okay_to_stop $p
- then stop $p
- fi
- done
-
- start watchquagga
-}
-
-
case "$1" in
start) start $2;;
stop) stop $2;;
status) status $2;;
- update) update;;
reload) start $2; reload_config $2;;
restart) stop $2; start $2;;
*) usage;;
diff --git a/templates/protocols/bgp/node.def b/templates/protocols/bgp/node.def
index 7f7e393f..7548ad6d 100644
--- a/templates/protocols/bgp/node.def
+++ b/templates/protocols/bgp/node.def
@@ -11,4 +11,4 @@ create: sudo /opt/vyatta/sbin/quagga-manager start bgpd
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(@)"
-end: sudo /opt/vyatta/sbin/quagga-manager update
+
diff --git a/templates/protocols/ospf/node.def b/templates/protocols/ospf/node.def
index dfae4396..555e9dba 100644
--- a/templates/protocols/ospf/node.def
+++ b/templates/protocols/ospf/node.def
@@ -2,4 +2,3 @@ help: Configure Open Shortest Path First protocol (OSPF) parameters
create: sudo /opt/vyatta/sbin/quagga-manager start ospfd
vyatta-vtysh -c "configure terminal" -c "router ospf"
delete: vyatta-vtysh -c "configure terminal" -c "no router ospf"
-end: sudo /opt/vyatta/sbin/quagga-manager update
diff --git a/templates/protocols/ospfv3/node.def b/templates/protocols/ospfv3/node.def
index e144e962..e1549441 100644
--- a/templates/protocols/ospfv3/node.def
+++ b/templates/protocols/ospfv3/node.def
@@ -2,4 +2,3 @@ help: Configure IPv6 Open Shortest Path First protocol (OSPFv3) parameters
create: sudo /opt/vyatta/sbin/quagga-manager start ospf6d
vyatta-vtysh -c "configure terminal" -c "router ospf6"
delete:vyatta-vtysh -c "configure terminal" -c "no router ospf6"
-end: sudo /opt/vyatta/sbin/quagga-manager update
diff --git a/templates/protocols/rip/node.def b/templates/protocols/rip/node.def
index 31f915c1..05cf72b1 100644
--- a/templates/protocols/rip/node.def
+++ b/templates/protocols/rip/node.def
@@ -2,4 +2,3 @@ help: Configure Routing Information Protocol (RIP) parameters
create: sudo /opt/vyatta/sbin/quagga-manager start ripd
vyatta-vtysh -c "configure terminal" -c "router rip"
delete: vyatta-vtysh -c "configure terminal" -c "no router rip"
-end: sudo /opt/vyatta/sbin/quagga-manager update
diff --git a/templates/protocols/ripng/node.def b/templates/protocols/ripng/node.def
index 9b0d1f5b..ed2c163f 100644
--- a/templates/protocols/ripng/node.def
+++ b/templates/protocols/ripng/node.def
@@ -2,4 +2,3 @@ help: Configure Routing Information Protocol (RIPng) parameters
create: sudo /opt/vyatta/sbin/quagga-manager start ripngd
vyatta-vtysh -c "configure terminal" -c "router ripng"
delete: vyatta-vtysh -c "configure terminal" -c "no router ripng"
-end: sudo /opt/vyatta/sbin/quagga-manager update