summaryrefslogtreecommitdiffstats
path: root/debian/patches/debian/Only-start-logind-if-dbus-is-installed.patch
blob: 825c7677ef2664339bf9ae62d712ed8bf5f7a599 (plain)
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
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Mon, 9 Feb 2015 10:53:43 +0100
Subject: Only start logind if dbus is installed

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.

Consider both dbus-daemon (the reference implementation) and
dbus-broker.

Part of #772700
---
 units/systemd-logind.service.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/units/systemd-logind.service.in b/units/systemd-logind.service.in
index 042ea75..89a7c89 100644
--- a/units/systemd-logind.service.in
+++ b/units/systemd-logind.service.in
@@ -16,6 +16,8 @@ Documentation=man:org.freedesktop.login1(5)
 
 Wants=user.slice modprobe@drm.service
 After=nss-user-lookup.target user.slice modprobe@drm.service
+ConditionPathExists=|/lib/systemd/system/dbus.service
+ConditionPathExists=|/lib/systemd/system/dbus-broker.service
 
 # Ask for the dbus socket.
 Wants=dbus.socket