From 454d95bd39e465417f8d1ad8e7e38d85e762bddb Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 19 Aug 2025 11:37:52 +0200 Subject: [PATCH] Update create_lxc.sh --- misc/create_lxc.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/create_lxc.sh b/misc/create_lxc.sh index f54016af..e171edb5 100644 --- a/misc/create_lxc.sh +++ b/misc/create_lxc.sh @@ -265,10 +265,11 @@ mapfile -t TEMPLATES < <( ) # If nothing found online, search local templates (file names only) +# If nothing found online, search local templates (extract filename from volume ID) if [ ${#TEMPLATES[@]} -eq 0 ]; then msg_info "Online search failed or no template found. Checking for local fallbacks..." mapfile -t TEMPLATES < <( - pveam list "$TEMPLATE_STORAGE" | awk -v s="$TEMPLATE_SEARCH" '$2 ~ s {print $2}' | sort -t - -k 2 -V + pveam list "$TEMPLATE_STORAGE" | awk -v s="$TEMPLATE_SEARCH" '$1 ~ s {print $1}' | sed 's/.*\///' | sort -t - -k 2 -V ) if [ ${#TEMPLATES[@]} -eq 0 ]; then