3 # xend Script to start and stop the Xen control daemon.
5 # chkconfig: 2345 98 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
27 while [ $? -ne 0 -a $i -lt $rets ]; do
36 if [ -f /var/lock/subsys/xend ]; then
37 msg_already_running "Xen control daemon"
40 if [ ! -f /var/lock/subsys/xenconsoled -o ! -f /var/lock/subsys/xenstored ]; then
41 echo "xenconsoled and xenstored must be started first"
44 show "Starting Xen control daemon"
49 if [ $RETVAL -eq 0 ]; then
50 touch /var/lock/subsys/xend
58 if [ ! -f /var/lock/subsys/xend ]; then
59 msg_not_running "Xen control daemon"
62 show "Stopping Xen control daemon"
66 rm -f /var/lock/subsys/xend
70 if [ ! -f /var/lock/subsys/xend ]; then
71 msg_not_running "Xen control daemon"
74 show "Reloading Xen control daemon"
81 if [ ! -f /var/lock/subsys/xend ]; then
82 msg_not_running "Xen control daemon"
85 show "Restarting Xen control daemon"
87 /usr/sbin/xend restart
90 if [ $RETVAL -eq 0 ]; then
98 # See how we were called.
107 /usr/sbin/xend status
112 restart|force-reload)
116 msg_usage "$0 {start|stop|status|restart|reload|force-reload}"