summaryrefslogtreecommitdiff
path: root/units/user-runtime-dir@.service.in
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-12-09 19:30:17 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-04-25 16:20:28 +0200
commita9f0f5e50104fc5cc511aa10007f7f8b8366fed8 (patch)
tree7f5d44a2ef17494db959f9cef8b6a49b76d73141 /units/user-runtime-dir@.service.in
parent284149392755f086d0a714071c33aa609e61505e (diff)
downloadsystemd-a9f0f5e50104fc5cc511aa10007f7f8b8366fed8.tar.gz
logind: split %t directory creation to a helper unit
Unfortunately this needs a new binary to do the mount because there's just too many special steps to outsource this to systemd-mount: - EPERM needs to be treated specially - UserRuntimeDir= setting must be obeyed - SELinux label must be adjusted This allows user@.service to be started independently of logind. So 'systemctl start user@nnn' will start the user manager for user nnn. Logind will start it too when the user logs in, and will stop it (unless lingering is enabled) when the user logs out. Fixes #7339.
Diffstat (limited to 'units/user-runtime-dir@.service.in')
-rw-r--r--units/user-runtime-dir@.service.in17
1 files changed, 17 insertions, 0 deletions
diff --git a/units/user-runtime-dir@.service.in b/units/user-runtime-dir@.service.in
new file mode 100644
index 0000000000..8c02beda3b
--- /dev/null
+++ b/units/user-runtime-dir@.service.in
@@ -0,0 +1,17 @@
+# 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
+StopWhenUnneeded=yes
+
+[Service]
+ExecStart=@rootlibexecdir@/systemd-user-runtime-dir start %i
+ExecStop=@rootlibexecdir@/systemd-user-runtime-dir stop %i
+RemainAfterExit=true