* [PATCH v2] dbus 1.4.1: create UUIDDIR in postinst
@ 2011-05-27 14:41 Koen Kooi
2011-05-27 15:35 ` Richard Purdie
0 siblings, 1 reply; 2+ messages in thread
From: Koen Kooi @ 2011-05-27 14:41 UTC (permalink / raw)
To: openembedded-core; +Cc: Koen Kooi
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>
---
Changes since v1:
* addressed pbs concerns about the || true and chgrp dots
* check for volatiles before trying to run the script
meta/recipes-core/dbus/dbus.inc | 12 +++++++++---
meta/recipes-core/dbus/dbus_1.4.1.bb | 2 +-
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index 2a5f8bd..38acf35 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"
diff --git a/meta/recipes-core/dbus/dbus_1.4.1.bb b/meta/recipes-core/dbus/dbus_1.4.1.bb
index 1c8aeaa..f65ef35 100644
--- a/meta/recipes-core/dbus/dbus_1.4.1.bb
+++ b/meta/recipes-core/dbus/dbus_1.4.1.bb
@@ -1,6 +1,6 @@
include dbus.inc
-PR = "r4"
+PR = "r5"
SRC_URI[md5sum] = "99cb057700c0455fb68f8d57902f77ac"
SRC_URI[sha256sum] = "caa1a0ded2d0f2e95c1d4ec7e3c8bd44834928c5b0ed41a7189963f3593983bd"
--
1.6.6.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-27 15:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-27 14:41 [PATCH v2] dbus 1.4.1: create UUIDDIR in postinst Koen Kooi
2011-05-27 15:35 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox