diff options
author | 2022-04-19 20:10:52 -0400 | |
---|---|---|
committer | 2022-04-19 20:11:39 -0400 | |
commit | 51e404af981ab18391ca44d121fba71946abcc17 (patch) | |
tree | fbc6ccc77ea3bcd7acfe97fba5752e892ce922f4 | |
parent | 1f9c37e1a67a269833605a083e26538b130e4d8e (diff) | |
download | meta-virtualization-51e404af981ab18391ca44d121fba71946abcc17.tar.gz meta-virtualization-51e404af981ab18391ca44d121fba71946abcc17.tar.bz2 meta-virtualization-51e404af981ab18391ca44d121fba71946abcc17.zip |
xen-tools: remove unused systemd/sysvinit files
The commit [ xen: only package xencommon systemd components if systemd
is enabled] attempted to only package init.d scripts for non-systemd
systems (and vice-versa for unit files).
But the xen-tools builds installs the files uncondtionally, so we can
end up with unpackaged files in some configurations. We can test on
the init system and removed the unused versions of the init to avoid
both packging and runtime issues.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r-- | recipes-extended/xen/xen-tools.inc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/recipes-extended/xen/xen-tools.inc b/recipes-extended/xen/xen-tools.inc index 6bbc8cd..27972c1 100644 --- a/recipes-extended/xen/xen-tools.inc +++ b/recipes-extended/xen/xen-tools.inc @@ -807,13 +807,24 @@ do_install() { done fi - # fixup default path to qemu-system-i386 - sed -i 's#\(test -z "$QEMU_XEN" && QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#' ${D}/etc/init.d/xencommons - if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service ]; then sed -i 's#ExecStart=.*qemu-system-i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \ ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service fi + + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + rm -f ${D}/${sysconfdir}/init.d/xencommons + else + # fixup default path to qemu-system-i386 + sed -i 's#\(test -z "$QEMU_XEN" && QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#' ${D}/etc/init.d/xencommons + + # remove the uncondiontally installed systemd service files + rm -f ${D}/${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service + rm -f ${D}/${systemd_unitdir}/system/xenconsoled.service + rm -f ${D}/${systemd_unitdir}/system/xen-init-dom0.service + rm -f ${D}/${systemd_unitdir}/system/xenstored.service + rm -f ${D}/${systemd_unitdir}/system/var-lib-xenstored.mount + fi } pkg_postinst:${PN}-volatiles() { |