Skip to content

Commit

Permalink
Merge pull request #313 from afbjorklund/loginctl-linger
Browse files Browse the repository at this point in the history
Remove warning about linger from older systemd
  • Loading branch information
AkihiroSuda authored Dec 7, 2023
2 parents 72e178d + 9d64405 commit f718485
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile.d/check-preflight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f718485

Please sign in to comment.