3 # xend Script to start and stop the Xen control daemon.
5 # chkconfig: 2345 96 01
6 # description: Starts and stops the Xen control daemon.
10 # Required-Start: $syslog $remote_fs xenstored xenconsoled
12 # Required-Stop: $syslog $remote_fs xenstored xenconsoled
14 # Default-Start: 2 3 4 5
16 # Short-Description: Start/stop xend
17 # Description: Starts and stops the Xen control daemon.
20 # Source function library.
21 . /etc/rc.d/init.d/functions
24 if [ -f /var/lock/subsys/xend ]; then
25 msg_already_running "Xen control daemon"
28 if [ ! -f /var/lock/subsys/xenconsoled -o ! -f /var/lock/subsys/xenstored ]; then
29 echo "xenconsoled and xenstored must be started first"
32 msg_starting "Starting Xen control daemon"
35 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/xend
39 if [ ! -f /var/lock/subsys/xend ]; then
40 msg_not_running "Xen control daemon"
43 msg_stopping "Stopping Xen control daemon"
45 rm -f /var/lock/subsys/xend
49 if [ ! -f /var/lock/subsys/xend ]; then
50 msg_not_running "Xen control daemon"
53 msg_reloading "Reloading Xen control daemon"
54 killproc /usr/sbin/xend -HUP
60 if [ ! -f /var/lock/subsys/xend ]; then
61 msg_not_running "Xen control daemon"
70 # See how we were called.
93 msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"