diff options
author | kaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk> | 2004-11-16 19:47:06 +0000 |
---|---|---|
committer | kaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk> | 2004-11-16 19:47:06 +0000 |
commit | 5661df515a065c912df90eb8ba98acc298f22ac8 (patch) | |
tree | a63b3533a2b4575c4b3d62a9232bb710f960fb04 | |
parent | 1b6f005a13db4df521ea09fe0243b825d10c1973 (diff) | |
parent | 0182092bce65369d4ae079d71b4d4a7143af68d0 (diff) | |
download | xen-5661df515a065c912df90eb8ba98acc298f22ac8.tar.gz xen-5661df515a065c912df90eb8ba98acc298f22ac8.tar.bz2 xen-5661df515a065c912df90eb8ba98acc298f22ac8.zip |
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
-rwxr-xr-x | tools/examples/init.d/xend | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/examples/init.d/xend b/tools/examples/init.d/xend index 7037848166..39324c7930 100755 --- a/tools/examples/init.d/xend +++ b/tools/examples/init.d/xend @@ -7,9 +7,24 @@ # chkconfig: 2345 98 01 # description: Starts and stops the Xen control daemon. +# Wait for Xend / Xfrd to be up +function await_daemons_up +{ + i=1 + rets=10 + xend status + while [ $? -ne 0 -a $i -lt $rets ]; do + sleep 1 + echo -n . + i=$(($i + 1)) + xend status + done +} + case "$1" in start) xend start + await_daemons_up ;; stop) xend stop @@ -19,6 +34,7 @@ case "$1" in ;; restart|reload) xend restart + await_daemons_up ;; *) # do not advertise unreasonable commands that there is no reason |