Paste #9HuJPkUvl8NhOgMsYMRq

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Martin Pitt <martin.pitt@ubuntu.com>
Subject: Don't stop D-Bus in the service unit

D-Bus is getting stopped too early during shutdown, so that services on the bus
are still running (and being shut down) after that. This leads to shutdown
hangs due to remote file systems not getting unmounted as wpa_supplicant is
already gone, or avahi or NetworkManager getting lots of errors because they
get disconnected, etc.  As D-Bus does not keep its state between restarts,
dbus.socket also does not help us.

Also, stopping D-Bus in a running system isn't something which we ever
supported; to the contrary, we patched several packages to avoid
restarting/stopping D-Bus in postinsts, as stopping d-bus in a running system
is shooting yourself into the foot (independent of which init system you use).
Thus leaving D-Bus running until the bitter end should be fine, it doesn't have
any file system things to do on shutdown. This also approximates the brave new
kdbus world where d-bus is basically "always available".

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89847
Bug-Ubuntu: https://launchpad.net/bugs/1438612

Index: dbus-1.9.20/bus/dbus.service.in
===================================================================
--- dbus-1.9.20.orig/bus/dbus.service.in
+++ dbus-1.9.20/bus/dbus.service.in
@@ -6,4 +6,6 @@ Requires=dbus.socket
 [Service]
 ExecStart=@EXPANDED_BINDIR@/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
 ExecReload=@EXPANDED_BINDIR@/dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig
+ExecStop=/bin/true
+KillMode=none
 OOMScoreAdjust=-900