dbus: fix post-install script to change ownership _after_ group and id is created.
authorMike Westerhof <mwester@dls.net>
Fri, 20 Feb 2009 05:33:44 +0000 (23:33 -0600)
committerMike Westerhof <mwester@dls.net>
Fri, 20 Feb 2009 05:33:44 +0000 (23:33 -0600)
packages/dbus/dbus.inc
packages/dbus/dbus_1.0.3.bb
packages/dbus/dbus_1.2.1.bb

index 64ef21c..047b33a 100644 (file)
@@ -79,8 +79,10 @@ fi
 MESSAGEUSER=messagebus
 MESSAGEHOME=/var/run/dbus
 mkdir -p $MESSAGEHOME || true
-chgrp "$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || addgroup "$MESSAGEUSER"
-chown "$MESSAGEUSER"."$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || adduser --system --home "$MESSAGEHOME" --no-create-home --disabled-password --ingroup "$MESSAGEUSER" "$MESSAGEUSER"
+grep -q ^$MESSAGEUSER: /etc/group || addgroup "$MESSAGEUSER"
+chgrp "$MESSAGEUSER" "$MESSAGEHOME"
+grep -q ^$MESSAGEUSER: /etc/passwd || adduser --system --home "$MESSAGEHOME" --no-create-home --disabled-password --ingroup "$MESSAGEUSER" "$MESSAGEUSER"
+chown "$MESSAGEUSER"."$MESSAGEUSER" "$MESSAGEHOME"
 grep -q netdev: /etc/group || addgroup netdev
 chmod u+s /usr/libexec/dbus-daemon-launch-helper
 }
index 6f71d06..2589cfe 100644 (file)
@@ -1,4 +1,4 @@
 require dbus.inc
-PR = "r15"
+PR = "r16"
 
 DEFAULT_PREFERENCE = "-1"
index e14523d..2a663f4 100644 (file)
@@ -1,3 +1,3 @@
 include dbus.inc
 
-PR = "r9"
+PR = "r10"