From 9d64405cd9b3ba01d61d8800030e55234d8f1504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Tue, 5 Dec 2023 10:55:59 +0100 Subject: [PATCH] Remove warning about linger from older systemd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Anders F Björklund --- Makefile.d/check-preflight.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.d/check-preflight.sh b/Makefile.d/check-preflight.sh index df4cd29..065307f 100755 --- a/Makefile.d/check-preflight.sh +++ b/Makefile.d/check-preflight.sh @@ -58,7 +58,7 @@ esac if [ "${rootless}" = "1" ]; then # Check systemd lingering: https://rootlesscontaine.rs/getting-started/common/login/ if command -v loginctl >/dev/null 2>&1; then - if [ "$(loginctl list-users --output json | jq ".[] | select(.uid == "${UID}").linger")" != "true" ]; then + if [ "$(loginctl show-user --property Linger "${UID}")" != "Linger=yes" ]; then WARNING 'systemd lingering is not enabled. Run `sudo loginctl enable-linger $(whoami)` to enable it, otherwise Kubernetes will exit on logging out.' fi else