summaryrefslogtreecommitdiff
path: root/app-emulation/xen-tools/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-13 21:03:07 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-13 21:03:07 +0100
commit8fbd420dce8836e6503b162092e07b6a77a89f1d (patch)
tree071c621ef44d7c1b24a430ac7671d68963b5a4cf /app-emulation/xen-tools/files
parent12d78242dec4f785d0a0bfb1c00eee2d8996c53b (diff)
gentoo resync : 13.10.2017
Diffstat (limited to 'app-emulation/xen-tools/files')
-rw-r--r--app-emulation/xen-tools/files/xenstored.initd-r142
1 files changed, 42 insertions, 0 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 $?
+}
+