mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
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>
This commit is contained in:
42
app-emulation/xen-tools/files/xenstored.initd-r1
Normal file
42
app-emulation/xen-tools/files/xenstored.initd-r1
Normal file
@@ -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 $?
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user