app-emulation/xen-tools: add ebuild
Package-Manager: Portage-2.3.69, Repoman-2.3.16
This commit is contained in:
parent
52217b65e1
commit
1d8dbdb1a6
19 changed files with 1115 additions and 0 deletions
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-2019 Gentoo Authors
|
||||
# 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
|
||||
printf "."
|
||||
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 $?
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue