diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-03-23 16:38:33 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-03-23 16:42:38 -0700 |
commit | 580e491468e4fdadc52952b09a2e35f864a2f7d8 (patch) | |
tree | e3ae76b13a6d9f3bd71b237405076bede351d781 /scripts | |
parent | b03c9ae8a6741d0f5d0f46e396c7023174d6f626 (diff) | |
download | vyatta-cfg-quagga-580e491468e4fdadc52952b09a2e35f864a2f7d8.tar.gz vyatta-cfg-quagga-580e491468e4fdadc52952b09a2e35f864a2f7d8.zip |
Start OSPF/RIP as needed during config
This only happens if link metrics set but OSPF/RIP not running yet.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/quagga-manager | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/quagga-manager b/scripts/quagga-manager index c97b5ede..e7b5d5ae 100755 --- a/scripts/quagga-manager +++ b/scripts/quagga-manager @@ -7,7 +7,7 @@ #echo $* | logger -p local7.debug -t quagga-manager usage() { - echo "Usage: $0 {start|stop|restart} {bgpd|ospfd|ripd|ripngd}" + echo "Usage: $0 {check|start|stop|restart} {bgpd|ospfd|ripd|ripngd}" exit 1 } @@ -23,6 +23,11 @@ fi pid_dir=/var/run/vyatta/quagga log_dir=/var/log/vyatta/quagga +check() { + local daemon=$1 + [ -f ${pid_dir}/${daemon}.pid ] || start $daemon +} + start() { local daemon=$1 local exe_file=/usr/sbin/vyatta-$daemon @@ -123,6 +128,7 @@ update() { case "$1" in + check) check $2;; start) start $2;; stop) stop $2;; update) update;; |