Am 13.07.2014 10:20, schrieb Simon McVittie:
> severity 754404 minor
> thanks
> 
> On 10/07/14 21:51, Michael Biebl quoted:
>>> Processing triggers for dbus (1.8.6-1) ...
>>> /usr/sbin/invoke-rc.d: line 288: /sbin/runlevel: No such file or directory
>>> [....] system message bus already started; not starting.?25l1G[32m ok 
>>> 39;49m?12l?25h.
> 
> For what it's worth, this is unnecessary in almost all cases -
> restarting "dbus-daemon --system" other than by rebooting is not a
> supported action, so the maintainer script just starts it if it isn't
> running, and doesn't restart it if it is already running. The failure to
> run /sbin/runlevel appears to have been harmless: invoke-rc.d still
> correctly determines that you already have a "dbus-daemon --system" running.
> 
> Forcing configuration to be reloaded (which is the part of dbus.postinst
> that's actually relevant to the trigger) is done via a D-Bus call, not
> via the init script, so that it can be the same code path regardless of
> whether we booted with sysvinit, systemd or Upstart; so we're not
> relying on invoke-rc.d for that either.
> 
> You could argue that the "make sure it has started" boilerplate
> shouldn't be run in response to a trigger, only in response to new
> installation. That code is provided by dh_installinit, so the dbus
> package has no control over it, other than using --noscripts and
> supplying equivalent code itself (which I'd rather avoid if possible).

Now that I think of it, that looks like a bug in the dbus.postinst.

Since it installs a file trigger, it should guard the reload
accordingly, i.e. when being triggered do the reload only and then exit.

See attached diff.

Simon, are you okay if we re-assign this to dbus?

Michael




-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
diff --git a/debian/dbus.postinst b/debian/dbus.postinst
index 0c71bbb..3e754a2 100644
--- a/debian/dbus.postinst
+++ b/debian/dbus.postinst
@@ -8,6 +8,13 @@ MESSAGEUSER=messagebus
 MESSAGEHOME=/var/run/dbus
 LAUNCHER=/usr/lib/dbus-1.0/dbus-daemon-launch-helper
 
+if [ "$1" = triggered ]; then
+    dbus-send --print-reply --system --type=method_call \
+        --dest=org.freedesktop.DBus \
+        / org.freedesktop.DBus.ReloadConfig > /dev/null || true
+    exit 0
+fi
+
 if [ "$1" = configure ]; then
     adduser --system \
             --quiet \

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to