mirror of
https://github.com/systemd/systemd.git
synced 2024-10-31 07:51:21 +03:00
473b9c683a
Followup to commit 13cf422e04
("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
23 lines
675 B
SYSTEMD
23 lines
675 B
SYSTEMD
# SPDX-License-Identifier: LGPL-2.1+
|
|
#
|
|
# This file is part of systemd.
|
|
#
|
|
# systemd is free software; you can redistribute it and/or modify it
|
|
# under the terms of the GNU Lesser General Public License as published by
|
|
# the Free Software Foundation; either version 2.1 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
[Unit]
|
|
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
|
|
ExecStop=@rootlibexecdir@/systemd-user-runtime-dir stop %i
|
|
Type=oneshot
|
|
RemainAfterExit=true
|
|
Slice=user-%i.slice
|