mirror of
https://git.yoctoproject.org/poky
synced 2026-04-30 03:32:12 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
13e2effd62
commit
a8d24829e7
@@ -18,9 +18,8 @@ set -e
|
||||
|
||||
DAEMON=/usr/bin/dbus-daemon
|
||||
NAME=dbus
|
||||
DAEMONUSER=messagebus
|
||||
PIDDIR=/var/run/dbus
|
||||
PIDFILE=$PIDDIR/pid
|
||||
DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf
|
||||
PIDFILE=/var/run/messagebus.pid # must match /etc/dbus-1/system.conf
|
||||
UUIDDIR=/var/lib/dbus
|
||||
DESC="system message bus"
|
||||
EVENTDIR=/etc/dbus-1/event.d
|
||||
@@ -38,11 +37,7 @@ test "$ENABLED" != "0" || exit 0
|
||||
|
||||
start_it_up()
|
||||
{
|
||||
if [ ! -d $PIDDIR ]; then
|
||||
mkdir -p $PIDDIR
|
||||
chown $DAEMONUSER $PIDDIR
|
||||
chgrp $DAEMONUSER $PIDDIR
|
||||
fi
|
||||
mkdir -p "`dirname $PIDFILE`"
|
||||
if [ -e $PIDFILE ]; then
|
||||
PIDDIR=/proc/$(cat $PIDFILE)
|
||||
if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then
|
||||
|
||||
@@ -18,9 +18,8 @@ set -e
|
||||
|
||||
DAEMON=/usr/bin/dbus-daemon
|
||||
NAME=dbus
|
||||
DAEMONUSER=messagebus
|
||||
PIDDIR=/var/run/dbus
|
||||
PIDFILE=$PIDDIR/pid
|
||||
DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf
|
||||
PIDFILE=/var/run/messagebus.pid # must match /etc/dbus-1/system.conf
|
||||
UUIDDIR=/var/lib/dbus
|
||||
DESC="system message bus"
|
||||
EVENTDIR=/etc/dbus-1/event.d
|
||||
@@ -38,11 +37,7 @@ test "$ENABLED" != "0" || exit 0
|
||||
|
||||
start_it_up()
|
||||
{
|
||||
if [ ! -d $PIDDIR ]; then
|
||||
mkdir -p $PIDDIR
|
||||
chown $DAEMONUSER $PIDDIR
|
||||
chgrp $DAEMONUSER $PIDDIR
|
||||
fi
|
||||
mkdir -p "`dirname $PIDFILE`"
|
||||
if [ -e $PIDFILE ]; then
|
||||
PIDDIR=/proc/$(cat $PIDFILE)
|
||||
if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then
|
||||
|
||||
Reference in New Issue
Block a user