summaryrefslogtreecommitdiffstats
path: root/recipes-extended
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2015-09-16 12:26:38 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2015-09-16 16:10:11 -0400
commita7841b85605ff1645675cab77569ff7576af9530 (patch)
treea7972e05bacc1b23ac2bcb9584f1dc9374a7d8d5 /recipes-extended
parenta27d411aefbf38e070adebac539c4981c2360b4d (diff)
downloadmeta-virtualization-a7841b85605ff1645675cab77569ff7576af9530.tar.gz
libvirt: Properly shutdown libvirtd.service
We build libvirt without support for sd_notify (dbus) therefor we have to run libvirtd as a 'forking daemon' (per commit 055744cdbc1526d966091158c8fae2d22c905db4 we pass --daemon) We need to update the systemd service file to reflect this such that the libvirtd.service can be properly stopped. If we ever enable sd_notify support in libvirt we can revert back to using the 'notify' systemd type. Without this change libvirtd continue to run even if the stop command is issued, subsequent attempts to start the service will fail. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-extended')
-rw-r--r--recipes-extended/libvirt/libvirt_1.2.19.bb5
1 files changed, 5 insertions, 0 deletions
diff --git a/recipes-extended/libvirt/libvirt_1.2.19.bb b/recipes-extended/libvirt/libvirt_1.2.19.bb
index f4333218..df53d59a 100644
--- a/recipes-extended/libvirt/libvirt_1.2.19.bb
+++ b/recipes-extended/libvirt/libvirt_1.2.19.bb
@@ -225,6 +225,11 @@ do_install_append() {
225 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then 225 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
226 # This variable is used by libvirtd.service to start libvirtd in the right mode 226 # This variable is used by libvirtd.service to start libvirtd in the right mode
227 sed -i '/#LIBVIRTD_ARGS="--listen"/a LIBVIRTD_ARGS="--listen --daemon"' ${D}/${sysconfdir}/sysconfig/libvirtd 227 sed -i '/#LIBVIRTD_ARGS="--listen"/a LIBVIRTD_ARGS="--listen --daemon"' ${D}/${sysconfdir}/sysconfig/libvirtd
228
229 # We can't use 'notify' when we don't support 'sd_notify' dbus capabilities.
230 sed -i -e 's/Type=notify/Type=forking/' \
231 -e '/Type=forking/a PIDFile=${localstatedir}/run/libvirtd.pid' \
232 ${D}/${systemd_unitdir}/system/libvirtd.service
228 fi 233 fi
229 234
230 # The /var/run/libvirt directories created by the Makefile 235 # The /var/run/libvirt directories created by the Makefile