From 97320318f431207c43e10a788e1c674d0f3ebe64 Mon Sep 17 00:00:00 2001 From: swaphb Date: Tue, 11 Aug 2026 16:49:04 -0400 Subject: [PATCH] fix Proxmox snippet storage detection --- scripts/proxmox/create-flatcar-gitea-runner.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/proxmox/create-flatcar-gitea-runner.sh b/scripts/proxmox/create-flatcar-gitea-runner.sh index 5cf79f2..eee58a6 100755 --- a/scripts/proxmox/create-flatcar-gitea-runner.sh +++ b/scripts/proxmox/create-flatcar-gitea-runner.sh @@ -87,8 +87,8 @@ if qm status "$VM_ID" >/dev/null 2>&1; then die "VM $VM_ID already exists; choose another VM_ID" fi -storage_config="$(pvesm config "$SNIPPET_STORAGE" 2>/dev/null || true)" -grep -Eq '(^|,)snippets(,|$)' <<<"$storage_config" || die "storage $SNIPPET_STORAGE is not configured for snippets. Enable it with: pvesm set $SNIPPET_STORAGE --content snippets" +snippet_storages="$(pvesm status --content snippets 2>/dev/null || true)" +awk -v storage="$SNIPPET_STORAGE" '$1 == storage {found = 1} END {exit !found}' <<<"$snippet_storages" || die "storage $SNIPPET_STORAGE is not configured for snippets. Enable it with: pvesm set $SNIPPET_STORAGE --content snippets" mkdir -p "$SNIPPET_DIR" "$IMAGE_CACHE_DIR" chmod 0750 "$SNIPPET_DIR"