diff options
author | Roger Pau Monne <roger.pau@entel.upc.edu> | 2012-01-07 00:46:20 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-01-12 20:39:35 +0000 |
commit | 49beded59a8d56b930765c9af2bbf3e0983e892c (patch) | |
tree | 28f0ddbc9df8725c957e9339314cf072e54463d8 /testing/xen/xend.initd | |
parent | 7ea9d9d7e0103e8ba8c023479de918206e52266a (diff) | |
download | aports-49beded59a8d56b930765c9af2bbf3e0983e892c.tar.bz2 aports-49beded59a8d56b930765c9af2bbf3e0983e892c.tar.xz |
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.
Diffstat (limited to 'testing/xen/xend.initd')
-rw-r--r-- | testing/xen/xend.initd | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/testing/xen/xend.initd b/testing/xen/xend.initd new file mode 100644 index 000000000..398ecd86b --- /dev/null +++ b/testing/xen/xend.initd @@ -0,0 +1,53 @@ +#!/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 +} |