3 # xend Script to start and stop the Xen control daemon.
5 # Author: Keir Fraser <keir.fraser@cl.cam.ac.uk>
7 # chkconfig: 2345 98 01
8 # description: Starts and stops the Xen control daemon.
10 # Source function library
11 . /etc/rc.d/init.d/functions
14 . /etc/sysconfig/network
16 if ! [ -e /proc/xen/privcmd ]; then
26 while [ $? -ne 0 -a $i -lt $rets ]; do
29 /usr/sbin/xend status > /dev/null 2>&1
37 if [ ! -f /var/lock/subsys/xend ]; then
39 daemon /usr/sbin/xend start
42 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/xend
44 msg_already_running xend
48 if [ -f /var/lock/subsys/xend ]; then
50 daemon /usr/sbin/xend stop
51 rm -f /var/lock/subsys/xend >/dev/null 2>&1
53 msg_not_running "xend"
59 restart|reload|force-reload)
61 daemon /usr/sbin/xend restart
66 # do not advertise unreasonable commands that there is no reason
67 # to use with this device
68 echo $"Usage: $0 {start|stop|status|restart|reload|force-reload}"