mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-12 21:57:27 +03:00
The user manager connects to oomd over varlink. Currently, during shutdown, if oomd is stopped before any user manager, the user manager will try to reconnect to the socket, leading to a warning from pid 1 about a conflicting transaction. Let's fix this by ordering user@.service after systemd-oomd.service, so that user sessions are stopped before systemd-oomd is stopped, which makes sure that the user sessions won't try to start oomd via its socket after systemd-oomd is stopped. (cherry picked from commit cafd2c0be404cb8879f91d15e05cc8b695b32629)
29 lines
815 B
SYSTEMD
29 lines
815 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)
|
|
After=user-runtime-dir@%i.service dbus.service systemd-oomd.service
|
|
Requires=user-runtime-dir@%i.service
|
|
IgnoreOnIsolate=yes
|
|
|
|
[Service]
|
|
User=%i
|
|
PAMName=systemd-user
|
|
Type=notify-reload
|
|
ExecStart={{ROOTLIBEXECDIR}}/systemd --user
|
|
Slice=user-%i.slice
|
|
KillMode=mixed
|
|
Delegate=pids memory cpu
|
|
TasksMax=infinity
|
|
TimeoutStopSec={{ DEFAULT_USER_TIMEOUT_SEC*4//3 }}s
|
|
KeyringMode=inherit
|
|
OOMScoreAdjust=100
|