diff options
Diffstat (limited to 'main/xen')
-rw-r--r-- | main/xen/APKBUILD | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | main/xen/xendomains.initd | 15 |
2 files changed, 17 insertions, 2 deletions
diff --git a/main/xen/APKBUILD b/main/xen/APKBUILD index 28dc252098..8b6f99802c 100644 --- a/main/xen/APKBUILD +++ b/main/xen/APKBUILD @@ -3,7 +3,7 @@ # Maintainer: William Pitcock <nenolod@dereferenced.org> pkgname=xen pkgver=4.1.2 -pkgrel=10 +pkgrel=11 pkgdesc="Xen hypervisor" url="http://www.xen.org/" arch="x86 x86_64" @@ -137,6 +137,6 @@ ed262f15fb880badb53575539468646c xenconsoled.initd ec2252c72050d7d5870a3a629b873ba6 xenconsoled.confd 89c936ddf327a3a78eaee33835880517 xend.initd 9261ad0f285836c1b0ea07f306e4586e xend.confd -6ce7f3069862ad23e3e1d908bb2b7987 xendomains.initd +9cc0883d472987038fd464a7e28372e3 xendomains.initd f3162b7c261bcaf49a67bd41d987df84 xendomains.confd 9df68ac65dc3f372f5d61183abdc83ff xen-consoles.logrotate" diff --git a/main/xen/xendomains.initd b/main/xen/xendomains.initd index 63d35fc714..c791e3e585 100644..100755 --- a/main/xen/xendomains.initd +++ b/main/xen/xendomains.initd @@ -29,9 +29,23 @@ using_screen() { } set_screen_cmd() { + export SCREENDIR=/var/run/xen-screens + checkpath --directory --mode 700 "$SCREENDIR" screen_cmd="screen -c ${SCREENRC:-/dev/null} -q -r ${SCREEN_NAME:=xen} -X" } +dir_is_empty() { + local dir=$1 + set -- "$dir"/* + test "$1" = "$dir/*" +} + +wait_screen() { + while dir_is_empty "$SCREENDIR"; do + sleep 0.1 + done +} + start() { set_screen_cmd @@ -39,6 +53,7 @@ start() { if using_screen ; then ebegin "Creating screen session to hold domain consoles" ( screen -c ${SCREENRC:-/dev/null} -d -m -S ${SCREEN_NAME} -t dom0 \ + && wait_screen \ && ${screen_cmd} zombie dr \ && logrotate -f /etc/xen/xen-consoles.logrotate \ && ${screen_cmd} logfile /var/log/xen-consoles/%t.log \ |