summaryrefslogtreecommitdiff
path: root/src/login/logind-session.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-08-08 15:27:49 +0200
committerSven Eden <sven.eden@prydeworx.com>2018-10-29 10:18:38 +0100
commit675752d11fd2fd1708d42a90b618a9556688a20a (patch)
tree315c0c3c3e92c901cb8d493e74607593b57a5af1 /src/login/logind-session.c
parenta6538e8d3030067b01ae436c59d7fc70559a40ac (diff)
logind: add a RequiresMountsFor= dependency from the session scope unit to the home directory of the user
This is useful so that during shutdown scope units are always terminated before the mounts necessary for the home directory. (Ideally we'd also add a similar dependency from the user@.service instance to the home directory, but this isn't as easy as that service is defined statically and not dynamically, and hence not easy to modify dynamically, in particular when it comes to deps) (cherry picked from commit d5ac9d060267820aabdf9af509a54a1830b27b7d)
Diffstat (limited to 'src/login/logind-session.c')
-rw-r--r--src/login/logind-session.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index 6e65c0bb5..27dcf83a6 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -653,6 +653,7 @@ static int session_start_scope(Session *s, sd_bus_message *properties, sd_bus_er
description,
STRV_MAKE(s->user->runtime_dir_service, s->user->service), /* These two have StopWhenUnneeded= set, hence add a dep towards them */
STRV_MAKE("systemd-logind.service", "systemd-user-sessions.service", s->user->runtime_dir_service, s->user->service), /* And order us after some more */
+ s->user->home,
properties,
error,
&s->scope_job);