#!/sbin/runscript # # xend Script to start and stop the Xen control daemon. # # Author: Keir Fraser # # chkconfig: 2345 98 01 # description: Starts and stops the Xen control daemon. opts="start stop status restart" depend() { before xendomain } 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 } start() { ebegin "Starting Xen control daemon" xend start await_daemons_up || die eend $? } stop() { ebegin "Stopping Xen control daemon" xend stop || die eend $? } status() { xend status }