[meta-virtualization] [PATCH] libvirt: get libvirt-guests systemd service running
Mark Asselstine
mark.asselstine at windriver.com
Fri Sep 11 07:42:04 PDT 2015
While testing libvirt with the new systemd init I found that the
libvirt-guests service was failing to run since the libvirt-guests.sh
script was not where it was expected. If we are building for systemd
init system use the default installation location which is used
upstream for the libvirt-guests.sh script.
Signed-off-by: Mark Asselstine <mark.asselstine at windriver.com>
---
recipes-extended/libvirt/libvirt_1.2.17.bb | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/recipes-extended/libvirt/libvirt_1.2.17.bb b/recipes-extended/libvirt/libvirt_1.2.17.bb
index 28a22bb..6f269f9 100644
--- a/recipes-extended/libvirt/libvirt_1.2.17.bb
+++ b/recipes-extended/libvirt/libvirt_1.2.17.bb
@@ -107,6 +107,7 @@ FILES_${PN}-libvirtd = " \
/usr/lib/sysctl.d/60-libvirtd.conf \
${sbindir}/libvirtd \
${systemd_unitdir}/system/* \
+ ${@base_contains('DISTRO_FEATURES', 'sysvinit', '', '${libexecdir}/libvirt-guests.sh', d)} \
"
FILES_${PN}-virsh = "${bindir}/virsh"
@@ -215,9 +216,11 @@ do_install_append() {
install -m 0755 ${WORKDIR}/libvirtd.sh ${D}/etc/init.d/libvirtd
install -m 0644 ${WORKDIR}/libvirtd.conf ${D}/etc/libvirt/libvirtd.conf
- # This will wind up in the libvirtd package, but will NOT be invoked by default.
- #
- mv ${D}/${libexecdir}/libvirt-guests.sh ${D}/${sysconfdir}/init.d
+ if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+ # This will wind up in the libvirtd package, but will NOT be invoked by default.
+ #
+ mv ${D}/${libexecdir}/libvirt-guests.sh ${D}/${sysconfdir}/init.d
+ fi
# The /var/run/libvirt directories created by the Makefile
# are wiped out in volatile, we need to create these at boot.
--
2.1.4
More information about the meta-virtualization
mailing list