Initialize variables in create_lxc_container

Added initialization for ONLINE_TEMPLATE and ONLINE_TEMPLATES arrays at the start of the create_lxc_container function to ensure variables are defined before use.
This commit is contained in:
CanbiZ (MickLesk)
2026-01-21 12:42:19 +01:00
parent 5384adf0c3
commit fe2384a2fa

View File

@@ -4478,6 +4478,10 @@ create_lxc_container() {
msg_info "Searching for template '$TEMPLATE_SEARCH'"
# Initialize variables
ONLINE_TEMPLATE=""
ONLINE_TEMPLATES=()
# Step 1: Check local templates first (instant)
mapfile -t LOCAL_TEMPLATES < <(
pveam list "$TEMPLATE_STORAGE" 2>/dev/null |