Subject: [alpine-devel] [PATCH] xen: prevent xenstore from being restared

From: Roger Pau Monne <[email-masked]>
Date: Tue, 20 Nov 2012 12:28:04 +0100

xenstore should not be restarted. If it is restarted watches are lost,
and several key components like kernel backend drivers will cease to
work.
---
 main/xen/APKBUILD        |    4 ++--
 main/xen/xenstored.initd |    9 +++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/main/xen/APKBUILD b/main/xen/APKBUILD
index dc14f90..17bfdd0 100644
--- a/main/xen/APKBUILD
+++ b/main/xen/APKBUILD
@@ -3,7 +3,7 @@
 # Maintainer: William Pitcock <[email-masked]>
 pkgname=xen
 pkgver=4.2.0
-pkgrel=4
+pkgrel=5
 pkgdesc="Xen hypervisor"
 url="http://www.xen.org/"
 arch="x86 x86_64"
@@ -143,7 +143,7 @@ fb7e76f00c2a4e63b408cb67df7d1a7b  xsa20.patch
 9151e7c648b12f518826ad0f0a67da42  xsa23-4.2-unstable.patch
 9bd8b30094f8eb2408846c1b6ed0cad6  xsa24.patch
 9fc7097ed2e5e756c4ae91145c143433  xsa25-4.2.patch
-09da578badbfc02d8018f422eb1242dd  xenstored.initd
+95d8af17bf844d41a015ff32aae51ba1  xenstored.initd
 b017ccdd5e1c27bbf1513e3569d4ff07  xenstored.confd
 ed262f15fb880badb53575539468646c  xenconsoled.initd
 ec2252c72050d7d5870a3a629b873ba6  xenconsoled.confd
diff --git a/main/xen/xenstored.initd b/main/xen/xenstored.initd
index 70ae214..537b64e 100644
--- a/main/xen/xenstored.initd
+++ b/main/xen/xenstored.initd
@@ -20,6 +20,10 @@ wait_xenstored_up() {
 }
 
 start() {
+	if xenstore-read -s / >/dev/null 2>&1; then
+		ewarn "Xenstore can only be started once"
+		return 0
+	fi
 	local _traceopt=
 	ebegin "Starting xenstored daemon"
 
@@ -51,9 +55,6 @@ start() {
 }
 
 stop() {
-	ebegin "Stopping xenstored daemon"
-	start-stop-daemon --stop --exec /usr/sbin/xenstored \
-		--pidfile /var/run/xenstored.pid
-	eend $?
+	ewarn "Xenstore can not be stopped"
 }
 
-- 
1.7.7.5 (Apple Git-26)

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