Subject: [alpine-devel] [PATCH] main/xen: fix xenstored init script

From: Roger Pau Monne <[email-masked]>
Date: Mon, 30 Apr 2012 13:29:39 +0100

Mount /proc/xen on init if it's not mounted.

Signed-off-by: Roger Pau Monne <[email-masked]>
---
 main/xen/APKBUILD        |    7 +++++--
 main/xen/xenstored.initd |    7 +++++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/main/xen/APKBUILD b/main/xen/APKBUILD
index 5e6a93e..993cfb2 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=7
+pkgrel=8
 pkgdesc="Xen hypervisor"
 url="http://www.xen.org/"
 arch="x86 x86_64"
@@ -85,6 +85,9 @@ package() {
 	make -j1 DESTDIR="$pkgdir" install-xen install-tools install-stubdom \
 		|| return 1
 
+	# remove default xencommons
+	rm -rf "$pkgdir"/etc/init.d/xencommons
+
 	for i in $source; do
 		case $i in
 		*.initd) install -Dm755 "$srcdir"/$i \
@@ -108,7 +111,7 @@ a7500c42804abdf68e051dc667e65f93  pygrub_alpine.patch
 fa06495a175571f4aa3b6cb88937953e  librt.patch
 1bea3543ddc712330527b62fd9ff6520  busybox-sed.patch
 c31163a3cd6cf58b4e9cac0e96812d65  e1000.patch
-095b20f33bd0fb3963002722870b1dda  xenstored.initd
+6e5739dad7e2bd1b625e55ddc6c782b7  xenstored.initd
 b017ccdd5e1c27bbf1513e3569d4ff07  xenstored.confd
 ed262f15fb880badb53575539468646c  xenconsoled.initd
 ec2252c72050d7d5870a3a629b873ba6  xenconsoled.confd
diff --git a/main/xen/xenstored.initd b/main/xen/xenstored.initd
index bbb4efb..f2c22cc 100644
--- a/main/xen/xenstored.initd
+++ b/main/xen/xenstored.initd
@@ -23,6 +23,13 @@ wait_xenstored_up() {
 start() {
 	local _traceopt=
 	ebegin "Starting xenstored daemon"
+
+	if ! test -f /proc/xen/capabilities && \
+	   ! grep '^xenfs ' /proc/mounts >/dev/null;
+	then
+		mount -t xenfs xenfs /proc/xen
+	fi
+
 	modprobe xen-evtchn 2>/dev/null
 	modprobe xen-gntdev 2>/dev/null
 	modprobe evtchn 2>/dev/null
-- 
1.7.10

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