Only start logind if dbus is installed
authorMartin Pitt <martin.pitt@ubuntu.com>
Mon, 9 Feb 2015 09:53:43 +0000 (10:53 +0100)
committerMichael Biebl <biebl@debian.org>
Wed, 21 Aug 2019 20:09:13 +0000 (21:09 +0100)
logind fails to start in environments without dbus, such as LXC containers or
servers. Add a startup condition to avoid the very noisy startup failure.

Part of #772700

Gbp-Pq: Topic debian
Gbp-Pq: Name Only-start-logind-if-dbus-is-installed.patch

units/systemd-logind.service.in

index 3eef95c6614f03fdbe25b16344251ef5d3ac4837..0e48b3d0bc813fafa898c5e9813c3449c63aad4e 100644 (file)
@@ -14,6 +14,7 @@ Documentation=https://www.freedesktop.org/wiki/Software/systemd/logind
 Documentation=https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Wants=user.slice
 After=nss-user-lookup.target user.slice
+ConditionPathExists=/lib/systemd/system/dbus.service
 
 # Ask for the dbus socket.
 Wants=dbus.socket