diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-05-07 09:13:19 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-05-07 09:13:19 -0700 |
commit | 495f3b830b19c58ec2dc5ca1b9fee91b1d252cf7 (patch) | |
tree | 292b9d390a64703e94424f39a2eb92a38915713d /scripts | |
parent | 580b08fdb0c476cce9713f06491997c5214b7663 (diff) | |
download | vyatta-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
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/quagga-manager | 41 |
1 files changed, 0 insertions, 41 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;; |