Files
xen/tools/hotplug/Linux/init.d/xend
T
Ian Jackson fd452d0f64 tools/hotplug etc.: remove Default-Enabled from LSB header
"Default-Enabled:" is not a LSB keyword.
Remove it from the LSB section.

This avoids an openSuSE buildcheck warning and we are not aware of any
reason why it should be kept.

From: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Modified-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-07-26 11:15:40 +01:00

71 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
#
# xend Script to start and stop the Xen control daemon.
#
# Author: Keir Fraser <keir.fraser@cl.cam.ac.uk>
#
# chkconfig: 2345 98 01
# description: Starts and stops the Xen control daemon.
### BEGIN INIT INFO
# Provides: xend
# Required-Start: $syslog $remote_fs xenstored
# Should-Start:
# Required-Stop: $syslog $remote_fs xenstored
# Should-Stop:
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: Start/stop xend
# Description: Starts and stops the Xen control daemon.
### END INIT INFO
shopt -s extglob
# Wait for Xend to be up
function 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
}
case "$1" in
start)
if [ -z "`ps -C xenconsoled -o pid=`" ]; then
echo "xencommons should be started first."
exit 1
fi
mkdir -p /var/lock/subsys
touch /var/lock/subsys/xend
xend start
await_daemons_up
;;
stop)
xend stop
rm -f /var/lock/subsys/xend
;;
status)
xend status
;;
reload)
xend reload
;;
restart|force-reload)
xend restart
await_daemons_up
;;
*)
# do not advertise unreasonable commands that there is no reason
# to use with this device
echo $"Usage: $0 {start|stop|status|restart|reload|force-reload}"
exit 1
esac
exit $?