summaryrefslogtreecommitdiff
path: root/units/user-runtime-dir@.service.in
Commit message (Collapse)AuthorAgeFilesLines
* logind: don't delay login for root even if systemd-user-sessions.service is ↵Franck Bui2022-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | not activated yet If for any reason something goes wrong during the boot process (most likely due to a network issue), system admins should be allowed to log in to the system to debug the problem. However due to the login session barrier enforced by systemd-user-sessions.service for all users, logins for root will be delayed until a (dbus) timeout expires. Beside being confusing, it's not a nice user experience to wait for an indefinite period of time (no message is shown) this and also suggests that something went wrong in the background. The reason of this delay is due to the fact that all units involved in the creation of a user session are ordered after systemd-user-sessions.service, which is subject to network issues. If root needs to log in at that time, logind is requested to create a new session (via pam_systemd), which ultimately ends up waiting for systemd-user-session.service to be activated. This has the bad side effect to block login for root until the dbus call done by pam_systemd times out and the PAM stack proceeds anyways. To solve this problem, this patch orders the session scope units and the user instances only after systemd-user-sessions.service for unprivileged users only.
* meson: use jinja2 for unit templatesZbigniew Jędrzejewski-Szmek2021-05-191-2/+2
| | | | | | | | | We don't need two (and half) templating systems anymore, yay! I'm keeping the changes minimal, to make the diff manageable. Some enhancements due to a better templating system might be possible in the future. For handling of '## ' — see the next commit.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* units: use =yes rather than =true everywhereLennart Poettering2018-10-131-1/+1
| | | | | | So far we always used "yes" instead of "true" in all our unit files, except for one outlier. Let's do this here too. No change in behaviour whatsoever, except that it looks prettier ;-)
* logind: change user-runtime-dir to query runtime dir size from logind via ↵Lennart Poettering2018-10-131-2/+2
| | | | | | | | | | | | | | | | the bus I think this is a slightly cleaner approach than parsing the configuration file at multiple places, as this way there's only a single reload cycle for logind.conf, and that's systemd-logind.service's runtime. This means that logind and dbus become a requirement of user-runtime-dir, but given that XDG_RUNTIME_DIR is not set anyway without logind and dbus around this isn't really any limitation. This also simplifies linking a bit as this means user-runtime-dir doesn't have to link against any code of logind itself.
* units: improve Description= string a bitLennart Poettering2018-10-131-1/+1
| | | | | | Let's not use the word "wrapper", as it's not clear what that is, and in some way any unit file is a "wrapper"... let's simply say that it's about the runtime directory.
* user-runtime-dir@.service: don't stop on runlevel switch (#10079)Alan Jenkins2018-09-141-0/+1
| | | | | | | | | | | | 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: assign user-runtime-dir@.service to user-%i.sliceLennart Poettering2018-08-031-0/+1
| | | | | | This service won't use much resources, but it's certainly nicer to see it attached th the user's slice along with user@.service, so that everything we run for a specific user is properly bound into one unit.
* units: order user-runtime-dir@.service after systemd-user-sessions.serviceLennart Poettering2018-08-031-0/+1
| | | | | | | We use systemd-user-sessions.service as barrier when to allow login sessions. With this patch user@.service is ordered after that too, so that any login related code (which user-runtime-dir@.service is) is guaranteed to run after the barrier, and never before.
* units: make sure user-runtime-dir@.service is Type=oneshotLennart Poettering2018-08-031-0/+1
| | | | | We order user@.service after it, hence we need to properly know when it finished starting up.
* man: add a description of user@.service, user-runtime-dir@.service, user-*.sliceZbigniew Jędrzejewski-Szmek2018-07-201-0/+1
| | | | Fixes #9590.
* logind: split %t directory creation to a helper unitZbigniew Jędrzejewski-Szmek2018-04-251-0/+17
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.