debuggers.hg
changeset 3040:a4f8b0734492
bitkeeper revision 1.1159.170.32 (419a593aACa3uJybVvoEJ_gaJcjDwA)
Merge freefall.cl.cam.ac.uk:/local/scratch/kaf24/xen-2.0-testing.bk
into freefall.cl.cam.ac.uk:/local/scratch/kaf24/xeno.bk
Merge freefall.cl.cam.ac.uk:/local/scratch/kaf24/xen-2.0-testing.bk
into freefall.cl.cam.ac.uk:/local/scratch/kaf24/xeno.bk
author | kaf24@freefall.cl.cam.ac.uk |
---|---|
date | Tue Nov 16 19:47:06 2004 +0000 (2004-11-16) |
parents | 4c4ec1d8c1f1 adea3db0783f |
children | d3865a06ff71 |
files | tools/examples/init.d/xend |
line diff
1.1 --- a/tools/examples/init.d/xend Tue Nov 16 17:36:06 2004 +0000 1.2 +++ b/tools/examples/init.d/xend Tue Nov 16 19:47:06 2004 +0000 1.3 @@ -7,9 +7,24 @@ 1.4 # chkconfig: 2345 98 01 1.5 # description: Starts and stops the Xen control daemon. 1.6 1.7 +# Wait for Xend / Xfrd to be up 1.8 +function await_daemons_up 1.9 +{ 1.10 + i=1 1.11 + rets=10 1.12 + xend status 1.13 + while [ $? -ne 0 -a $i -lt $rets ]; do 1.14 + sleep 1 1.15 + echo -n . 1.16 + i=$(($i + 1)) 1.17 + xend status 1.18 + done 1.19 +} 1.20 + 1.21 case "$1" in 1.22 start) 1.23 xend start 1.24 + await_daemons_up 1.25 ;; 1.26 stop) 1.27 xend stop 1.28 @@ -19,6 +34,7 @@ case "$1" in 1.29 ;; 1.30 restart|reload) 1.31 xend restart 1.32 + await_daemons_up 1.33 ;; 1.34 *) 1.35 # do not advertise unreasonable commands that there is no reason