From 473b9c683ad66e8713603e4b3643ed183c0b2c35 Mon Sep 17 00:00:00 2001 From: Alan Jenkins Date: Fri, 14 Sep 2018 04:11:57 +0100 Subject: [PATCH] user-runtime-dir@.service: don't stop on runlevel switch (#10079) Followup to commit 13cf422e04b7 ("user@.service: don't kill user manager at runlevel switch") I think there's a general rule that units with `StopWhenUnneeded=yes` need `IgnoreOnIsolate=yes`... But it doesn't apply to `suspend.target` and friends. `printer.target` and friends break on isolate even if we apply the rule[1]. That just leaves `graphical-session.target`, which is a user service. "isolate" is *mostly* a weird attempt to emulate runlevels, so I decided not to worry about it for user services. [1] https://github.com/systemd/systemd/issues/6505#issuecomment-320644819 --- units/user-runtime-dir@.service.in | 1 + 1 file changed, 1 insertion(+) diff --git a/units/user-runtime-dir@.service.in b/units/user-runtime-dir@.service.in index 434413525e..8c5407b881 100644 --- a/units/user-runtime-dir@.service.in +++ b/units/user-runtime-dir@.service.in @@ -12,6 +12,7 @@ Description=/run/user/%i mount wrapper Documentation=man:user@.service(5) After=systemd-user-sessions.service StopWhenUnneeded=yes +IgnoreOnIsolate=yes [Service] ExecStart=@rootlibexecdir@/systemd-user-runtime-dir start %i