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.
24 while [ $? -ne 0 -a $i -lt $rets ]; do
33 if [ -f /var/lock/subsys/xend ]; then
34 msg_already_running "Xen control daemon"
37 if [ ! -f /var/lock/subsys/xenconsoled -o ! -f /var/lock/subsys/xenstored ]; then
38 echo "xenconsoled and xenstored must be started first"
41 show "Starting Xen control daemon"
46 if [ $RETVAL -eq 0 ]; then
47 touch /var/lock/subsys/xend
55 if [ ! -f /var/lock/subsys/xend ]; then
56 msg_not_running "Xen control daemon"
59 show "Stopping Xen control daemon"
63 rm -f /var/lock/subsys/xend
67 if [ ! -f /var/lock/subsys/xend ]; then
68 msg_not_running "Xen control daemon"
71 show "Reloading Xen control daemon"
78 if [ ! -f /var/lock/subsys/xend ]; then
79 msg_not_running "Xen control daemon"
82 show "Restarting Xen control daemon"
84 /usr/sbin/xend restart
87 if [ $RETVAL -eq 0 ]; then
95 # See how we were called.
104 /usr/sbin/xend status
109 restart|force-reload)
113 msg_usage "$0 {start|stop|status|restart|reload|force-reload}"