[oe-commits] Ross Burton : dbus: mask the dbus-1 init script if using systemd
git at git.openembedded.org
git at git.openembedded.org
Thu Feb 6 15:25:54 UTC 2014
Module: openembedded-core.git
Branch: master
Commit: c910aa17689077362a25938aeebee7fb24057e30
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=c910aa17689077362a25938aeebee7fb24057e30
Author: Ross Burton <ross.burton at intel.com>
Date: Thu Feb 6 13:15:39 2014 +0000
dbus: mask the dbus-1 init script if using systemd
If the image is built with both systemd and sysvinit there'll be a dbus-1 init
script and a dbus service. This means systemd can try and launch both, which
won't work.
There's a systemctl mask to stop this in systemd-compat-units, but the logical
place for it to be is in the dbus recipe so it can't be left out of an image.
Signed-off-by: Ross Burton <ross.burton at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/recipes-core/dbus/dbus.inc | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index cf17b62..db47ede 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -62,6 +62,14 @@ RRECOMMENDS_${PN}-lib = "${PN}"
FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
pkg_postinst_dbus() {
+ # If both systemd and sysvinit are enabled, mask the dbus-1 init script
+ if ${@base_contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
+ systemctl $OPTS mask dbus-1.service
+ fi
+
if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
/etc/init.d/populate-volatile.sh update
fi
More information about the Openembedded-commits
mailing list