Skip to contentSkip to conversation

libvirt: get libvirt-guests systemd service running

PATCH New Mark Asselstine 1 participant 1 message Sep 11, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libvirt: get libvirt-guests systemd service running

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.

---
 recipes-extended/libvirt/libvirt_1.2.17.bb | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
recipes-extended/libvirt/libvirt_1.2.17.bb +6 -3
index 28a22bb..6f269f9 100644
@@ -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.
Signature · 1 line
2.1.4