summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-23 16:38:33 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-23 16:42:38 -0700
commit580e491468e4fdadc52952b09a2e35f864a2f7d8 (patch)
treee3ae76b13a6d9f3bd71b237405076bede351d781 /scripts
parentb03c9ae8a6741d0f5d0f46e396c7023174d6f626 (diff)
downloadvyatta-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-xscripts/quagga-manager8
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;;