diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-emulation/xen-tools/files/xenconsoled.initd | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'app-emulation/xen-tools/files/xenconsoled.initd')
-rw-r--r-- | app-emulation/xen-tools/files/xenconsoled.initd | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/app-emulation/xen-tools/files/xenconsoled.initd b/app-emulation/xen-tools/files/xenconsoled.initd new file mode 100644 index 000000000000..094871cd0478 --- /dev/null +++ b/app-emulation/xen-tools/files/xenconsoled.initd @@ -0,0 +1,33 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need xenstored + after lvm +} + +# bug #498720 +shutdown_all_domU() { + # Note: shutdown all domU, including manually started ones + local V=$(xl info| awk "/xen_minor/ { print \$3 }") + # 4.2.2 do not support "-a" option + [ $V -gt 2 ] && xl shutdown -a -w >/dev/null +} + +start() { + ebegin "Starting xenconsoled daemon" + start-stop-daemon --start --exec /usr/sbin/xenconsoled \ + --pidfile /run/xenconsoled.pid \ + -- --pid-file=/run/xenconsoled.pid \ + ${XENCONSOLED_OPTS} + eend $* +} + +stop() { + ebegin "Stopping xenconsoled daemon" + shutdown_all_domU + start-stop-daemon --stop --exec /usr/sbin/xenconsoled \ + --pidfile /run/xenconsoled.pid + eend $* +} |