summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Mozes <hydrapolic@gmail.com>2017-10-12 10:07:40 +0200
committerYixun Lan <dlan@gentoo.org>2017-10-13 16:04:28 +0800
commit53ff5de18863280ca005fdde6c0b924abac77fa3 (patch)
treec03c6d48f20e0fa7439fbae78266f5aacb4bacd9 /app-emulation
parentapp-emulation/xen-tools: fix security bugs (diff)
downloadgentoo-53ff5de18863280ca005fdde6c0b924abac77fa3.tar.gz
gentoo-53ff5de18863280ca005fdde6c0b924abac77fa3.tar.bz2
gentoo-53ff5de18863280ca005fdde6c0b924abac77fa3.zip
app-emulation/xen-tools: use xen-init-dom0
Gentoo-Bug: 634042 Package-Manager: Portage-2.3.11, Repoman-2.3.3 Closes: https://github.com/gentoo/gentoo/pull/5925 Signed-off-by: Yixun Lan <dlan@gentoo.org>
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/xen-tools/files/xenstored.initd-r142
-rw-r--r--app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild2
2 files changed, 43 insertions, 1 deletions
diff --git a/app-emulation/xen-tools/files/xenstored.initd-r1 b/app-emulation/xen-tools/files/xenstored.initd-r1
new file mode 100644
index 000000000000..262535d68093
--- /dev/null
+++ b/app-emulation/xen-tools/files/xenstored.initd-r1
@@ -0,0 +1,42 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ before xendomains xend sshd ntp-client ntpd nfs nfsmount rsyncd portmap dhcp
+ need xencommons
+}
+
+xenstored_dir_check() {
+ # create dir dynamically
+ local i
+ for i in /var/lock/subsys /run/xen /run/xend/boot /run/xenstored; do
+ [ -x $i ] || mkdir -p $i
+ done
+}
+
+start() {
+ ebegin "Starting xenstored daemon"
+ xenstored_dir_check
+ start-stop-daemon --start --exec /usr/sbin/xenstored \
+ --pidfile /run/xenstored.pid \
+ -- --pid-file=/run/xenstored.pid \
+ $XENSTORED_OPTS
+ until xenstore-exists / || $((15 < ++i))
+ do
+ echo -n .
+ sleep 1
+ done
+ einfo "Setting domain0 name record"
+ /usr/libexec/xen/bin/xen-init-dom0
+
+ eend $*
+}
+
+stop() {
+ ebegin "Stopping xenstored daemon"
+ start-stop-daemon --stop --exec /usr/sbin/xenstored \
+ --pidfile /run/xenstored.pid
+ eend $?
+}
+
diff --git a/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild
index 2a5886ec70ec..3e35cd4c8eac 100644
--- a/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild
@@ -418,7 +418,7 @@ src_install() {
newconfd "${FILESDIR}"/xenstored.confd xenstored
newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
- newinitd "${FILESDIR}"/xenstored.initd xenstored
+ newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
newinitd "${FILESDIR}"/xencommons.initd xencommons
newconfd "${FILESDIR}"/xencommons.confd xencommons