]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: add dep on systemd-logind.service by user@.service
authorLennart Poettering <lennart@poettering.net>
Mon, 1 Jul 2024 10:40:33 +0000 (12:40 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 1 Jul 2024 16:52:35 +0000 (18:52 +0200)
Let's make sure logind is accessible by the time user@.service runs, and
that logind stays around as long as it does so.

Addresses an issue reported here:

https://lists.freedesktop.org/archives/systemd-devel/2024-June/050468.html

This addresses an issued introduced by
278e815bfa3e4c2e3914e00121c37fc844cb2025, which dropped the a dependency
from user@.service systemd-user-sessions.service without replacement.
While dropping that dependency does make sense, it should have been
replaced with the weaker dependency on systemd-logind.service, hence fix
that now.

user@.service is after all a logind concept, hence logind really should
be around for its lifetime.

systemd-user-sessions.service is a later milestone that only really
should apply to regular users (not root), hence it's too strong a
requirement.

units/user-runtime-dir@.service.in
units/user@.service.in

index 5fb5cad36a688ec05109b3fb217aaa00215a163f..241e9267bb0c85254ca863194ed1c87a669c1d47 100644 (file)
@@ -10,7 +10,7 @@
 [Unit]
 Description=User Runtime Directory /run/user/%i
 Documentation=man:user@.service(5)
-After=dbus.service
+After=systemd-logind.service dbus.service
 IgnoreOnIsolate=yes
 
 [Service]
index 5efb12a8601bb7e5c58be4ec63d8eca4ce09acb9..569546574721709809324a8c30616534a74d6fb6 100644 (file)
@@ -11,7 +11,7 @@
 Description=User Manager for UID %i
 Documentation=man:user@.service(5)
 BindsTo=user-runtime-dir@%i.service
-After=user-runtime-dir@%i.service dbus.service systemd-oomd.service
+After=systemd-logind.service user-runtime-dir@%i.service dbus.service systemd-oomd.service
 IgnoreOnIsolate=yes
 
 [Service]