]> code.ossystems Code Review - openembedded-core.git/commitdiff
dbus 1.4.1: create UUIDDIR in postinst
authorKoen Kooi <koen@dominion.thruhere.net>
Fri, 27 May 2011 14:41:48 +0000 (16:41 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 27 May 2011 15:34:54 +0000 (16:34 +0100)
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>
meta/recipes-core/dbus/dbus.inc
meta/recipes-core/dbus/dbus_1.4.1.bb

index 2a5f8bdb984115a0a148775cf7474809b9ecc734..38acf354fbb5a7fc6e18534ccf6c64f2c9e63db6 100644 (file)
@@ -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"
index 1c8aeaa5cc5737f1037d7820532e0af76f0a0d68..f65ef35b9032ea1fbf9f76d6530aefdb9fc700de 100644 (file)
@@ -1,6 +1,6 @@
 include dbus.inc
 
-PR = "r4"
+PR = "r5"
 
 SRC_URI[md5sum] = "99cb057700c0455fb68f8d57902f77ac"
 SRC_URI[sha256sum] = "caa1a0ded2d0f2e95c1d4ec7e3c8bd44834928c5b0ed41a7189963f3593983bd"