aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/dbus/dbus.inc
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2014-02-06 13:15:39 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-06 15:23:40 +0000
commitc910aa17689077362a25938aeebee7fb24057e30 (patch)
treeb015f12ace3d86d7a504c5fcda545d124b5d5c15 /meta/recipes-core/dbus/dbus.inc
parentdcf228fe69bfee4e22baad477ad407248c0f9cdb (diff)
downloadopenembedded-core-contrib-c910aa17689077362a25938aeebee7fb24057e30.tar.gz
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@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/dbus/dbus.inc')
-rw-r--r--meta/recipes-core/dbus/dbus.inc8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index cf17b62234..db47ede0be 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