dcavalca / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
Blob Blame History Raw
From dc76cad2163e39553af52c5a56fe1f8419ba17ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 14 Feb 2014 17:01:43 -0500
Subject: [PATCH] units: systemd-logind fails hard without dbus

That is, without --enable-kdbus and kdbus running.

With --enable-kdbus things are more complicated, because dbus might be
necessary, if kdbus is missing at runtime. If it is not necessary,
the socket will be started, which is not imporant, but not the service.

(cherry picked from commit 8f9c6fe5ff1d59001aecbf3fbf9ca0ed7ff28ba7)
---
 units/systemd-logind.service.in | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/units/systemd-logind.service.in b/units/systemd-logind.service.in
index 31b5cd011f..e0b1b59df2 100644
--- a/units/systemd-logind.service.in
+++ b/units/systemd-logind.service.in
@@ -13,6 +13,11 @@ Documentation=http://www.freedesktop.org/wiki/Software/systemd/multiseat
 Wants=user.slice
 After=nss-user-lookup.target user.slice
 
+# Ask for the dbus socket. If running over kdbus, the socket will
+# not be actually used.
+Wants=dbus.socket
+After=dbus.socket
+
 [Service]
 ExecStart=@rootlibexecdir@/systemd-logind
 Restart=always