aports/testing/xen/xend.initd
Roger Pau Monne 49beded59a testing/xen: add xen 4.1.2
Build full Xen distribution.

Changes since v4:

 * Removed "opts=" from xencommons init script.

 * Backported upstream patch to boot Syslinux PV-DomUs with pygrub
   (allows booting Alpine PV-DomUs).

Changes since v3:

 * Added bash as a runtime dependency, since some hotplug scripts
   use that instead of /bin/sh.

Changes since v2:

 * Clean and updated init scripts to be as similar as possible to
   upstream version.

Changes since v1:

 * Removed net from xencommons dependencies and added udev.
2012-01-12 20:39:35 +00:00

54 lines
813 B
Plaintext

#!/sbin/runscript
depend() {
need xencommons
before xendomains
}
await_daemons_up() {
i=1
rets=10
/usr/sbin/xend status
while [ $? -ne 0 -a $i -lt $rets ]; do
sleep 1
i=$(($i + 1))
/usr/sbin/xend status
done
}
start() {
ebegin "Starting Xen daemons"
if [ -z "`ps xenconsoled -o pid=`" ]; then
eend 1
echo "xencommons should be started first."
exit 1
fi
mkdir -p /var/lock
if [ -d /var/lock/subsys ]; then
touch /var/lock/subsys/xend
else
touch /var/lock/xend
fi
/usr/sbin/xend start
await_daemons_up
eend $?
}
stop() {
ebegin "Stopping Xen control daemon"
/usr/sbin/xend stop
rm -f /var/lock/subsys/xend /var/lock/xend
eend $?
}
restart() {
ebegin "Restarting Xen control daemon"
/usr/sbin/xend restart
await_daemons_up
eend $?
}
status() {
/usr/sbin/xend status
}