aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/dbus/dbus.inc
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-05-27 16:41:48 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-27 16:34:54 +0100
commit4c3490922c3bea5f9c9810bb40dc5f5d8783de5a (patch)
tree7d8b342ff5c3a125e215ed923bde20a4639b0908 /meta/recipes-core/dbus/dbus.inc
parent729999cb384978404ecdfa8ea4ae0eb831fb9ece (diff)
downloadopenembedded-core-contrib-4c3490922c3bea5f9c9810bb40dc5f5d8783de5a.tar.gz
dbus 1.4.1: create UUIDDIR in postinst
This fixes dbus usage in non-sysV init systems. Volatiles aren't needed in systemd land, since /run is tmpfs and the dbus units take care of all this. Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> 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.inc12
1 files changed, 9 insertions, 3 deletions
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index 2a5f8bdb98..38acf354fb 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -49,13 +49,17 @@ pkg_postinst_dbus() {
MESSAGEUSER=messagebus
MESSAGEHOME=/var/run/dbus
+ UUIDDIR=/var/lib/dbus
- mkdir -p $MESSAGEHOME || true
+ mkdir -p $MESSAGEHOME
+ mkdir -p $UUIDDIR
chgrp "$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || addgroup "$MESSAGEUSER"
- chown "$MESSAGEUSER"."$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || \
+ chown "$MESSAGEUSER":"$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || \
adduser --system --home "$MESSAGEHOME" --no-create-home --disabled-password \
--ingroup "$MESSAGEUSER" "$MESSAGEUSER"
+ chown "$MESSAGEUSER":"$MESSAGEUSER" "$UUIDDIR"
+
grep -q netdev: /etc/group || addgroup netdev
chown root:"$MESSAGEUSER" /usr/libexec/dbus-daemon-launch-helper
@@ -63,7 +67,9 @@ pkg_postinst_dbus() {
# add volatile after new user/grp are created
echo "d messagebus messagebus 0755 /var/run/dbus none" > /etc/default/volatiles/99_dbus
- /etc/init.d/populate-volatile.sh update
+ if [ -e /etc/init.d/populate-volatile.sh ] ; then
+ /etc/init.d/populate-volatile.sh update
+ fi
}
EXTRA_OECONF_X = "--with-x"