From a2c46d65477ee9da158a23773d3611c0fe09378a Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Tue, 15 Jul 2025 11:35:18 -0600 Subject: [PATCH] Enable linger earlier for podman Signed-off-by: Zack Cerza --- scripts/setup_container_runtime.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/setup_container_runtime.sh b/scripts/setup_container_runtime.sh index 375bcaad..c1634fda 100755 --- a/scripts/setup_container_runtime.sh +++ b/scripts/setup_container_runtime.sh @@ -2,6 +2,9 @@ # vim: ts=4 sw=4 expandtab function setup_container_runtime () { if command -v podman; then + if ! [ -d /run/user/$(id -u) -a -w /run/user/$(id -u) ]; then + sudo loginctl enable-linger $(id -nu) + fi PODMAN_MAJOR_VERSION=$(podman version -f json | jq -r '.Client.Version|split(".")[0]') if [ "$PODMAN_MAJOR_VERSION" -lt 4 ]; then echo "Found a very old podman; removing" @@ -25,9 +28,6 @@ function setup_container_runtime () { fi if command -v podman; then - if ! [ -d /run/user/$(id -u) -a -w /run/user/$(id -u) ]; then - sudo loginctl enable-linger $(id -nu) - fi PODMAN_MAJOR_VERSION=$(podman version -f json | jq -r '.Client.Version|split(".")[0]') if [ "$PODMAN_MAJOR_VERSION" -ge 4 ]; then PODMAN_DIR="$HOME/.local/share/containers" -- 2.39.5