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)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 5 Jul 2024 18:00:04 +0000 (20:00 +0200)
commit05c9bc547b3430ffb668f42a925b3c933e4f0aa2
tree72c3f68299d1aef6f5ee8a79942b653e55a93922
parentd1cd66ca979d5f1ddedac171de73e28e22e739f3
units: add dep on systemd-logind.service by user@.service

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.

(cherry picked from commit 29294d21cf82323bf04a9dbb5a03d48d6f758822)
units/user-runtime-dir@.service.in
units/user@.service.in