Subject: [alpine-devel] [PATCH] main/xen: update to match new OpenRC and kernel 3.2

From: Roger Pau Monne <[email-masked]>
Date: Wed, 8 Feb 2012 10:09:23 +0100

---
 main/xen/APKBUILD         |    4 ++--
 main/xen/xencommons.initd |   29 +++++++++++++----------------
 2 files changed, 15 insertions(+), 18 deletions(-)
 mode change 100644 => 100755 main/xen/xencommons.initd

diff --git a/main/xen/APKBUILD b/main/xen/APKBUILD
index 0fe61ee..0ec727e 100644
--- a/main/xen/APKBUILD
+++ b/main/xen/APKBUILD
@@ -3,7 +3,7 @@
 # Maintainer: William Pitcock <[email-masked]>
 pkgname=xen
 pkgver=4.1.2
-pkgrel=3
+pkgrel=4
 pkgdesc="Xen hypervisor"
 url="http://www.xen.org/"
 arch="x86 x86_64"
@@ -91,6 +91,6 @@ b973dc1ffcc6872e222b36f3b7b4836b  fix_bswap_blktap2.patch
 a7500c42804abdf68e051dc667e65f93  pygrub_alpine.patch
 fa06495a175571f4aa3b6cb88937953e  librt.patch
 1bea3543ddc712330527b62fd9ff6520  busybox-sed.patch
-4cf88b53f8ca8d99ad52bae419b620a7  xencommons.initd
+62b3c5a7cff38c12df2de89af5d83fa1  xencommons.initd
 b5bfc08b82bc0d21193714719a719798  xend.initd
 86e7923383a906404da321d1814657e9  xendomains.initd"
diff --git a/main/xen/xencommons.initd b/main/xen/xencommons.initd
old mode 100644
new mode 100755
index 3d3c5da..7543cae
--- a/main/xen/xencommons.initd
+++ b/main/xen/xencommons.initd
@@ -18,22 +18,6 @@ if ! test -d /proc/xen ; then
 	exit 0
 fi
 
-# mount xenfs in dom0 or domU with a pv_ops kernel
-if test "x$1" = xstart && \
-	! test -f /proc/xen/capabilities && \
-	! grep '^xenfs ' /proc/mounts >/dev/null;
-then
-	mount -t xenfs xenfs /proc/xen
-fi
-
-# run this script only in dom0:
-# no capabilities file in xenlinux domU kernel
-# empty capabilities file in pv_ops domU kernel
-if test -f /proc/xen/capabilities && \
-   ! grep -q "control_d" /proc/xen/capabilities ; then
-	exit 0
-fi
-
 depend() {
 	need udev
 	before xend
@@ -48,6 +32,19 @@ start() {
 	modprobe evtchn 2>/dev/null
 	modprobe gntdev 2>/dev/null
 
+	# mount xenfs in dom0 or domU with a pv_ops kernel
+	if ! test -f /proc/xen/capabilities && \
+	   ! grep '^xenfs ' /proc/mounts >/dev/null;
+	then
+		mount -t xenfs xenfs /proc/xen
+	fi
+
+	# assert we are running in the dom0
+	if test -f /proc/xen/capabilities && \
+	   ! grep -q "control_d" /proc/xen/capabilities ; then
+		exit 0
+	fi
+
 	if ! `xenstore-read -s / >/dev/null 2>&1`
 	then
 		test -z "$XENSTORED_ROOTDIR" || XENSTORED_ROOTDIR="/var/lib/xenstored"
-- 
1.7.9

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Natanael Copa <[email-masked]>
Date: Tue, 14 Feb 2012 11:23:13 +0100

On Wed,  8 Feb 2012 10:09:23 +0100

>  mode change 100644 => 100755 main/xen/xencommons.initd

Applied.

Thanks! 

-nc

---