]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
setup_container_runtime.sh: Always enable linger
authorZack Cerza <zack@cerza.org>
Thu, 21 Aug 2025 16:40:02 +0000 (10:40 -0600)
committerZack Cerza <zack@cerza.org>
Thu, 21 Aug 2025 17:04:30 +0000 (11:04 -0600)
Signed-off-by: Zack Cerza <zack@cerza.org>
scripts/setup_container_runtime.sh

index 9b4184d66b862116c73119ce5343d3acc90bdba7..563f64cf7da89ccb2cb3ca48a66d3ffa0f80f133 100755 (executable)
@@ -1,10 +1,8 @@
 #!/bin/bash -ex
 # vim: ts=4 sw=4 expandtab
 function setup_container_runtime () {
+  loginctl enable-linger "$(id -nu)"
   if command -v podman; then
-    if ! [ -d "/run/user/$(id -u)" ] && [ -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"