diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/dbus/dbus-1.4.20/dbus-1.init | 11 | ||||
-rw-r--r-- | meta/recipes-core/dbus/dbus-1.5.12/dbus-1.init | 11 |
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 | ||
19 | DAEMON=/usr/bin/dbus-daemon | 19 | DAEMON=/usr/bin/dbus-daemon |
20 | NAME=dbus | 20 | NAME=dbus |
21 | DAEMONUSER=messagebus | 21 | DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf |
22 | PIDDIR=/var/run/dbus | 22 | PIDFILE=/var/run/messagebus.pid # must match /etc/dbus-1/system.conf |
23 | PIDFILE=$PIDDIR/pid | ||
24 | UUIDDIR=/var/lib/dbus | 23 | UUIDDIR=/var/lib/dbus |
25 | DESC="system message bus" | 24 | DESC="system message bus" |
26 | EVENTDIR=/etc/dbus-1/event.d | 25 | EVENTDIR=/etc/dbus-1/event.d |
@@ -38,11 +37,7 @@ test "$ENABLED" != "0" || exit 0 | |||
38 | 37 | ||
39 | start_it_up() | 38 | start_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 | ||
19 | DAEMON=/usr/bin/dbus-daemon | 19 | DAEMON=/usr/bin/dbus-daemon |
20 | NAME=dbus | 20 | NAME=dbus |
21 | DAEMONUSER=messagebus | 21 | DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf |
22 | PIDDIR=/var/run/dbus | 22 | PIDFILE=/var/run/messagebus.pid # must match /etc/dbus-1/system.conf |
23 | PIDFILE=$PIDDIR/pid | ||
24 | UUIDDIR=/var/lib/dbus | 23 | UUIDDIR=/var/lib/dbus |
25 | DESC="system message bus" | 24 | DESC="system message bus" |
26 | EVENTDIR=/etc/dbus-1/event.d | 25 | EVENTDIR=/etc/dbus-1/event.d |
@@ -38,11 +37,7 @@ test "$ENABLED" != "0" || exit 0 | |||
38 | 37 | ||
39 | start_it_up() | 38 | start_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 |