From 580e491468e4fdadc52952b09a2e35f864a2f7d8 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 23 Mar 2009 16:38:33 -0700 Subject: Start OSPF/RIP as needed during config This only happens if link metrics set but OSPF/RIP not running yet. --- scripts/quagga-manager | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'scripts') 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;; -- cgit v1.2.3