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
33
app-emulation/xen-tools/files/xenconsoled.initd
Normal file
33
app-emulation/xen-tools/files/xenconsoled.initd
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# 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 $*
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue