summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/dbus
diff options
context:
space:
mode:
authorAndy Ross <andy.ross@windriver.com>2012-08-10 12:00:41 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-15 14:26:41 +0100
commita8d24829e75e1821dfcc641d4a1bebceab269466 (patch)
tree11e6f51b250c3aea113d4be997e8c6a50436336b /meta/recipes-core/dbus
parent13e2effd623aa2c3a864c46e4530cc238c59f0bb (diff)
downloadpoky-a8d24829e75e1821dfcc641d4a1bebceab269466.tar.gz
dbus: Fix pid file in dbus init script
The PIDFILE (/var/run/dbus/pid) referenced by /etc/init.d/dbus-1 did not match the path (/var/run/messagebus.pid) configured in /etc/dbus-1/system.conf, so the initscript could start the daemon, but not stop it. Also remove needless directory ownership logic (dbus-daemon drops its pid file as root before calling setuid). (From OE-Core rev: 23cfbff5611c2ed52eedfaa99b1d6eccd326f035) Signed-off-by: Andy Ross <andy.ross@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/dbus')
-rw-r--r--meta/recipes-core/dbus/dbus-1.4.20/dbus-1.init11
-rw-r--r--meta/recipes-core/dbus/dbus-1.5.12/dbus-1.init11
2 files changed, 6 insertions, 16 deletions
diff --git a/meta/recipes-core/dbus/dbus-1.4.20/dbus-1.init b/meta/recipes-core/dbus/dbus-1.4.20/dbus-1.init
index 4abc4cbf73..17b58ed18f 100644
--- a/meta/recipes-core/dbus/dbus-1.4.20/dbus-1.init
+++ b/meta/recipes-core/dbus/dbus-1.4.20/dbus-1.init
@@ -18,9 +18,8 @@ set -e
18 18
19DAEMON=/usr/bin/dbus-daemon 19DAEMON=/usr/bin/dbus-daemon
20NAME=dbus 20NAME=dbus
21DAEMONUSER=messagebus 21DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf
22PIDDIR=/var/run/dbus 22PIDFILE=/var/run/messagebus.pid # must match /etc/dbus-1/system.conf
23PIDFILE=$PIDDIR/pid
24UUIDDIR=/var/lib/dbus 23UUIDDIR=/var/lib/dbus
25DESC="system message bus" 24DESC="system message bus"
26EVENTDIR=/etc/dbus-1/event.d 25EVENTDIR=/etc/dbus-1/event.d
@@ -38,11 +37,7 @@ test "$ENABLED" != "0" || exit 0
38 37
39start_it_up() 38start_it_up()
40{ 39{
41 if [ ! -d $PIDDIR ]; then 40 mkdir -p "`dirname $PIDFILE`"
42 mkdir -p $PIDDIR
43 chown $DAEMONUSER $PIDDIR
44 chgrp $DAEMONUSER $PIDDIR
45 fi
46 if [ -e $PIDFILE ]; then 41 if [ -e $PIDFILE ]; then
47 PIDDIR=/proc/$(cat $PIDFILE) 42 PIDDIR=/proc/$(cat $PIDFILE)
48 if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then 43 if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then
diff --git a/meta/recipes-core/dbus/dbus-1.5.12/dbus-1.init b/meta/recipes-core/dbus/dbus-1.5.12/dbus-1.init
index 4abc4cbf73..17b58ed18f 100644
--- a/meta/recipes-core/dbus/dbus-1.5.12/dbus-1.init
+++ b/meta/recipes-core/dbus/dbus-1.5.12/dbus-1.init
@@ -18,9 +18,8 @@ set -e
18 18
19DAEMON=/usr/bin/dbus-daemon 19DAEMON=/usr/bin/dbus-daemon
20NAME=dbus 20NAME=dbus
21DAEMONUSER=messagebus 21DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf
22PIDDIR=/var/run/dbus 22PIDFILE=/var/run/messagebus.pid # must match /etc/dbus-1/system.conf
23PIDFILE=$PIDDIR/pid
24UUIDDIR=/var/lib/dbus 23UUIDDIR=/var/lib/dbus
25DESC="system message bus" 24DESC="system message bus"
26EVENTDIR=/etc/dbus-1/event.d 25EVENTDIR=/etc/dbus-1/event.d
@@ -38,11 +37,7 @@ test "$ENABLED" != "0" || exit 0
38 37
39start_it_up() 38start_it_up()
40{ 39{
41 if [ ! -d $PIDDIR ]; then 40 mkdir -p "`dirname $PIDFILE`"
42 mkdir -p $PIDDIR
43 chown $DAEMONUSER $PIDDIR
44 chgrp $DAEMONUSER $PIDDIR
45 fi
46 if [ -e $PIDFILE ]; then 41 if [ -e $PIDFILE ]; then
47 PIDDIR=/proc/$(cat $PIDFILE) 42 PIDDIR=/proc/$(cat $PIDFILE)
48 if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then 43 if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then