commit: 53ff5de18863280ca005fdde6c0b924abac77fa3 Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com> AuthorDate: Thu Oct 12 08:07:40 2017 +0000 Commit: Yixun Lan <dlan <AT> gentoo <DOT> org> CommitDate: Fri Oct 13 08:04:28 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53ff5de1
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 <AT> gentoo.org> app-emulation/xen-tools/files/xenstored.initd-r1 | 42 +++++++++++++++++++++++ app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) 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 00000000000..262535d6809 --- /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 2a5886ec70e..3e35cd4c8ea 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
