summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2016-01-06 21:32:20 -0600
committerMatthias Maier <tamiko@gentoo.org>2016-01-07 09:15:09 +0100
commitc5f6db512e407f2957eb68a6801edcc555db4ac8 (patch)
treea886eb37c857bd5eb10b34404b5942e874b087a5 /app-emulation/libvirt/files
parentnet-p2p/i2p: Add missing die. (diff)
downloadgentoo-c5f6db512e407f2957eb68a6801edcc555db4ac8.tar.gz
gentoo-c5f6db512e407f2957eb68a6801edcc555db4ac8.tar.bz2
gentoo-c5f6db512e407f2957eb68a6801edcc555db4ac8.zip
app-emulation/libvirt: fix up service dependencies
libvirtd requires virtlogd so this adds it as a 'need'. Change the other services to be on their own line to be a bit more clear in the future. Change failure to start due to missing directories into a test and create rather than failure. Gentoo-Bug: 571084 Package-Manager: portage-2.2.26 Signed-off-by: Doug Goldstein <cardoe@gentoo.org> Signed-off-by: Matthias Maier <tamiko@gentoo.org>
Diffstat (limited to 'app-emulation/libvirt/files')
-rw-r--r--app-emulation/libvirt/files/libvirtd.init-r1635
1 files changed, 35 insertions, 0 deletions
diff --git a/app-emulation/libvirt/files/libvirtd.init-r16 b/app-emulation/libvirt/files/libvirtd.init-r16
new file mode 100644
index 000000000000..2aa9a880dba3
--- /dev/null
+++ b/app-emulation/libvirt/files/libvirtd.init-r16
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="Virtual Machine Management daemon (libvirt)"
+
+LIBVIRTD_OPTS=${LIBVIRTD_OPTS:-"${LIBVIRTD_OPTS}"}
+LIBVIRTD_TIMEOUT=${LIBVIRTD_TERMTIMEOUT:-"TERM/25/KILL/5"}
+
+command="/usr/sbin/libvirtd"
+command_args="-d ${LIBVIRTD_OPTS}"
+start_stop_daemon_args="--env KRB5_KTNAME=/etc/libvirt/krb5.tab"
+pidfile="/var/run/libvirtd.pid"
+retry="${LIBVIRTD_TERMTIMEOUT}"
+
+depend() {
+ need virtlogd
+ use dbus virtlockd
+ after ntp-client ntpd nfs nfsmount portmap rpc.statd iptables ip6tables ebtables corosync sanlock cgconfig xenconsoled
+ USE_FLAG_FIREWALLD
+ USE_FLAG_AVAHI
+ USE_FLAG_ISCSI
+ USE_FLAG_RBD
+}
+
+start_pre() {
+ # Test configuration directories in /etc/libvirt/ to be either not
+ # present or a directory, i.e. not a regular file, bug #532892
+
+ checkpath --directory /etc/libvirt/lxc || return 1
+ checkpath --directory /etc/libvirt/nwfilter || return 1
+ checkpath --directory /etc/libvirt/qemu || return 1
+ checkpath --directory /etc/libvirt/storage || return 1
+}