main/dbus: fix and improve init script
- Do not force supervise-daemon! See e.g. 49943448 for explanation. - Set safer permissions on /run/dbus.
main/dbus/dbus.confd
0 → 100644
#!/sbin/openrc-run | #!/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" | name="System Message Bus" | ||
description="D-Bus 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" | 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() { | depend() { | ||
need localmount | need localmount | ||
after bootmisc | after bootmisc | ||
} | } | ||
start_pre() { | start_pre() { | ||
/usr/bin/dbus-uuidgen --ensure=/etc/machine-id | checkpath -d -m750 -o root:messagebus /run/dbus || return 1 | ||
|
|||
# We need to test if /var/run/dbus exists, since script will fail if it does not | /usr/bin/dbus-uuidgen --ensure=/etc/machine-id | ||
[ -e /run/dbus ] || mkdir /run/dbus | |||
} | } | ||
stop_post() { | stop_post() { | ||
... | ... |