mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
Description: add force-reload option Debian policy requires init scripts to implement force-reload. So, alias that to restart. From: Adam Heath <doogie@brainfood.com> Signed-off-by: ian.pratt@cl.cam.ac.uk
48 lines
772 B
Bash
Executable File
48 lines
772 B
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.
|
|
|
|
# Wait for Xend / Xfrd 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)
|
|
xend start
|
|
await_daemons_up
|
|
;;
|
|
stop)
|
|
xend stop
|
|
;;
|
|
status)
|
|
xend status
|
|
;;
|
|
restart|reload|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 $?
|
|
|