]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
user-runtime-dir@.service: don't stop on runlevel switch (#10079)
authorAlan Jenkins <alan.christopher.jenkins@gmail.com>
Fri, 14 Sep 2018 03:11:57 +0000 (04:11 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 14 Sep 2018 03:11:57 +0000 (12:11 +0900)
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

index 434413525eb5ab47e11ccdd5c5551ab1f43480a5..8c5407b881f8770b4712380ce0feafc8d797e5cd 100644 (file)
@@ -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