mirror of
https://github.com/systemd/systemd.git
synced 2024-12-02 23:03:50 +08:00
29294d21cf
Let's make sure logind is accessible by the time user@.service runs, and
that logind stays around as long as it does so.
Addresses an issue reported here:
https://lists.freedesktop.org/archives/systemd-devel/2024-June/050468.html
This addresses an issued introduced by
278e815bfa
, which dropped the a dependency
from user@.service systemd-user-sessions.service without replacement.
While dropping that dependency does make sense, it should have been
replaced with the weaker dependency on systemd-logind.service, hence fix
that now.
user@.service is after all a logind concept, hence logind really should
be around for its lifetime.
systemd-user-sessions.service is a later milestone that only really
should apply to regular users (not root), hence it's too strong a
requirement.
31 lines
886 B
SYSTEMD
31 lines
886 B
SYSTEMD
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
#
|
|
# 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=User Manager for UID %i
|
|
Documentation=man:user@.service(5)
|
|
BindsTo=user-runtime-dir@%i.service
|
|
After=systemd-logind.service user-runtime-dir@%i.service dbus.service systemd-oomd.service
|
|
IgnoreOnIsolate=yes
|
|
|
|
[Service]
|
|
User=%i
|
|
PAMName=systemd-user
|
|
Type=notify-reload
|
|
ExecStart={{LIBEXECDIR}}/systemd --user
|
|
Slice=user-%i.slice
|
|
KillMode=mixed
|
|
Delegate=pids memory cpu
|
|
DelegateSubgroup=init.scope
|
|
TasksMax=infinity
|
|
TimeoutStopSec={{ DEFAULT_USER_TIMEOUT_SEC*4//3 }}s
|
|
KeyringMode=inherit
|
|
OOMScoreAdjust=100
|
|
MemoryPressureWatch=skip
|