aboutsummaryrefslogtreecommitdiffstats
path: root/main/dbus/dbus.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/dbus/dbus.initd')
-rw-r--r--main/dbus/dbus.initd21
1 files changed, 8 insertions, 13 deletions
diff --git a/main/dbus/dbus.initd b/main/dbus/dbus.initd
index 2fbd3e54643..915522142a9 100644
--- a/main/dbus/dbus.initd
+++ b/main/dbus/dbus.initd
@@ -1,32 +1,27 @@
#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License, v2 or later
-
-supervisor=supervise-daemon
-
name="System Message Bus"
description="D-Bus System Message Bus"
-command="/usr/bin/dbus-daemon"
-command_args="--system"
-command_args_foreground="--nofork"
-
extra_started_commands="reload"
+command="/usr/bin/dbus-daemon"
+command_args="--system --nofork --nopidfile --syslog-only ${command_args:-}"
+command_background="yes"
+pidfile="/run/$RC_SVCNAME.pid"
+
depend() {
need localmount
after bootmisc
}
start_pre() {
- /usr/bin/dbus-uuidgen --ensure=/etc/machine-id
+ checkpath -d -m755 -o root:messagebus /run/dbus || return 1
- # We need to test if /var/run/dbus exists, since script will fail if it does not
- [ -e /var/run/dbus ] || mkdir /var/run/dbus
+ /usr/bin/dbus-uuidgen --ensure="${machine_id:-/etc/machine-id}"
}
stop_post() {
- [ ! -S /var/run/dbus/system_bus_socket ] || rm -f /var/run/dbus/system_bus_socket
+ [ ! -S /run/dbus/system_bus_socket ] || rm -f /run/dbus/system_bus_socket
}
reload() {