Correct the systemd version required for ConditionEnvironment=

According to systemd's NEWS file, the ConditionEnvironment= setting
has only been introduced in systemd 246, not in 245 like the comment
in the services files claimed.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1472#note_942075

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1472>
This commit is contained in:
Hans Ulrich Niedermann 2020-10-23 10:42:38 +02:00 committed by Marge Bot
parent feb3c6b618
commit 38d642541c
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ Before=gnome-session-initialized.target
Slice=session.slice Slice=session.slice
Type=notify Type=notify
# NOTE: This can be replaced with ConditionEnvironment=XDG_SESSION_TYPE=%I # NOTE: This can be replaced with ConditionEnvironment=XDG_SESSION_TYPE=%I
# with systemd >= 245. Also, the current solution is kind of painful # with systemd >= 246. Also, the current solution is kind of painful
# as systemd had a bug where it retries the condition. # as systemd had a bug where it retries the condition.
# Only start if the template instance matches the session type. # Only start if the template instance matches the session type.
ExecCondition=/bin/sh -c 'test "$XDG_SESSION_TYPE" = "%I" || exit 2' ExecCondition=/bin/sh -c 'test "$XDG_SESSION_TYPE" = "%I" || exit 2'

View File

@ -21,7 +21,7 @@ StartLimitBurst=3
Slice=session.slice Slice=session.slice
Type=notify Type=notify
# NOTE: This can be replaced with ConditionEnvironment=XDG_SESSION_TYPE=%I # NOTE: This can be replaced with ConditionEnvironment=XDG_SESSION_TYPE=%I
# with systemd >= 245. Also, the current solution is kind of painful # with systemd >= 246. Also, the current solution is kind of painful
# as systemd had a bug where it retries the condition. # as systemd had a bug where it retries the condition.
# Only start if the template instance matches the session type. # Only start if the template instance matches the session type.
ExecCondition=/bin/sh -c 'test "$XDG_SESSION_TYPE" = "%I" || exit 2' ExecCondition=/bin/sh -c 'test "$XDG_SESSION_TYPE" = "%I" || exit 2'