summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ross <aross@gentoo.org>2006-10-07 10:07:09 +0000
committerAndrew Ross <aross@gentoo.org>2006-10-07 10:07:09 +0000
commitf52dc8a3a543bf5b24ef065cc1bec6ec132c2a8e (patch)
treeaca6557df7a1f25423bd5597fbda3adf7ed5d859 /app-emulation
parent/etc/init.d/xendomains now correctly handles domains with numbers, periods, a... (diff)
downloadaross-f52dc8a3a543bf5b24ef065cc1bec6ec132c2a8e.tar.gz
aross-f52dc8a3a543bf5b24ef065cc1bec6ec132c2a8e.tar.bz2
aross-f52dc8a3a543bf5b24ef065cc1bec6ec132c2a8e.zip
/etc/init.d/xend stop now stops xenstored and xenconsole in addition to xend (bug #149321).
svn path=/; revision=22
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/xen-tools/Manifest12
-rw-r--r--app-emulation/xen-tools/files/3.0.2-r4/xend.initd60
-rw-r--r--app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild2
3 files changed, 69 insertions, 5 deletions
diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 6b3fb25..f3acb6a 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,3 +1,7 @@
+AUX 3.0.2-r4/xend.initd 1140 RMD160 3850b3f5dace285643d51b4aa13e3f1230415fc1 SHA1 0764741535fbe4833ec0296ba8c055f1166b715f SHA256 dfe6b8fe04599325b21f70f2a130cccf4d8f5b9c92bfe78b4357eb05175c0b15
+MD5 c8664f58b15dd3a4937c6622ea425040 files/3.0.2-r4/xend.initd 1140
+RMD160 3850b3f5dace285643d51b4aa13e3f1230415fc1 files/3.0.2-r4/xend.initd 1140
+SHA256 dfe6b8fe04599325b21f70f2a130cccf4d8f5b9c92bfe78b4357eb05175c0b15 files/3.0.2-r4/xend.initd 1140
AUX 3.0.2-r4/xendomains.initd 2168 RMD160 c6dc22f50cf575393cb076c2abfff8b3f24b5540 SHA1 a7f75a7aff0ffdb3ca330f853855b888cfb7f752 SHA256 ed1adcb24e5ffe1c0abc33d6bd69f129b31b3d4f068222ee343809a8dd12b8d0
MD5 a3b477fa44710894c47b0aeca7d6a57a files/3.0.2-r4/xendomains.initd 2168
RMD160 c6dc22f50cf575393cb076c2abfff8b3f24b5540 files/3.0.2-r4/xendomains.initd 2168
@@ -51,10 +55,10 @@ EBUILD xen-tools-3.0.2-r3.ebuild 5530 RMD160 fe932ebe8722970f5a433a0619552c6ec2f
MD5 11588a83ffd3177430efeca5cc668ba3 xen-tools-3.0.2-r3.ebuild 5530
RMD160 fe932ebe8722970f5a433a0619552c6ec2f93eaf xen-tools-3.0.2-r3.ebuild 5530
SHA256 cff3399ef7a791cafcf2053c00124ab56772b730ac8aa32a088ced857b011c1e xen-tools-3.0.2-r3.ebuild 5530
-EBUILD xen-tools-3.0.2-r4.ebuild 5300 RMD160 0d9825d94857a0e6d94d2814793641b0379b02cc SHA1 f8ec0796dc867da0c291b6d134c916fbd23c33cf SHA256 029e5f214644ee7cc3f3089d6fa4210c8be59bd34414518e50ac28fcabe440c6
-MD5 6ddd5b799276dded36c5dba765d84cde xen-tools-3.0.2-r4.ebuild 5300
-RMD160 0d9825d94857a0e6d94d2814793641b0379b02cc xen-tools-3.0.2-r4.ebuild 5300
-SHA256 029e5f214644ee7cc3f3089d6fa4210c8be59bd34414518e50ac28fcabe440c6 xen-tools-3.0.2-r4.ebuild 5300
+EBUILD xen-tools-3.0.2-r4.ebuild 5307 RMD160 a098195f636977cdef74182ab288e273cd53c7ec SHA1 a41a97af737fb6f80f2469946b0ae912317446b4 SHA256 f2a0e5397b7291eb6a3d0b446758ef2bce1df9839b71efafb97b6f8e73a9426a
+MD5 229b789c67228f84c887b1677e13bc0e xen-tools-3.0.2-r4.ebuild 5307
+RMD160 a098195f636977cdef74182ab288e273cd53c7ec xen-tools-3.0.2-r4.ebuild 5307
+SHA256 f2a0e5397b7291eb6a3d0b446758ef2bce1df9839b71efafb97b6f8e73a9426a xen-tools-3.0.2-r4.ebuild 5307
MD5 6618adc624bc8ab64af0f4555c33529a files/digest-xen-tools-3.0.2-r3 235
RMD160 ad3a1d2a82c40b0bca653431c2d7964809580e5e files/digest-xen-tools-3.0.2-r3 235
SHA256 274536fc8a3cb10fda114e533062b0dbddcda4ae15f52033a39b85785b221794 files/digest-xen-tools-3.0.2-r3 235
diff --git a/app-emulation/xen-tools/files/3.0.2-r4/xend.initd b/app-emulation/xen-tools/files/3.0.2-r4/xend.initd
new file mode 100644
index 0000000..9f7fb74
--- /dev/null
+++ b/app-emulation/xen-tools/files/3.0.2-r4/xend.initd
@@ -0,0 +1,60 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+opts="start stop status restart"
+
+depend() {
+ need net
+ before xendomains sshd ntp-client ntpd nfs nfsmount rsyncd portmap dhcp
+}
+
+await_daemons_up() {
+ for ((i=0; i<5; i++)); do
+ sleep 1
+ /usr/sbin/xend status && return 0
+ done
+ return 1
+}
+
+is_privileged_domain() {
+ grep -qsE '^control_d$' /proc/xen/capabilities
+ return $?
+}
+
+start() {
+ if is_privileged_domain ; then
+ ebegin "Starting Xen control daemon"
+ /usr/sbin/xend start
+ /usr/sbin/xend status || await_daemons_up
+ eend $?
+ else
+ eerror "Can't start xend - this is not a privileged domain."
+ return 1
+ fi
+}
+
+stop() {
+ if [ "$(xm list | wc -l)" -gt 2 ]; then
+ ebegin " Stopping all domains"
+ /usr/sbin/xm shutdown --all --wait >/dev/null
+ eend $?
+ fi
+
+ ebegin "Stopping Xen control daemon"
+ /usr/sbin/xend stop
+ eend $?
+
+ ebegin "Stopping xenconsoled"
+ kill $(</var/run/xenconsoled.pid)
+ eend $?
+
+ ebegin "Stopping xenstored"
+ kill $(</var/run/xenstore.pid)
+ eend $?
+}
+
+status() {
+ is_privileged_domain && /usr/sbin/xend status
+}
diff --git a/app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild b/app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild
index bb91d14..a0ad1ce 100644
--- a/app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild
+++ b/app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild
@@ -154,7 +154,7 @@ src_install() {
doman docs/man?/*
- newinitd "${FILESDIR}"/xend.initd xend
+ newinitd "${FILESDIR}/${PVR}"/xend.initd xend
newconfd "${FILESDIR}"/xendomains.confd xendomains
newinitd "${FILESDIR}/${PVR}"/xendomains.initd xendomains