mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-18 08:22:16 +00:00
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:
@@ -4478,6 +4478,10 @@ create_lxc_container() {
|
|||||||
|
|
||||||
msg_info "Searching for template '$TEMPLATE_SEARCH'"
|
msg_info "Searching for template '$TEMPLATE_SEARCH'"
|
||||||
|
|
||||||
|
# Initialize variables
|
||||||
|
ONLINE_TEMPLATE=""
|
||||||
|
ONLINE_TEMPLATES=()
|
||||||
|
|
||||||
# Step 1: Check local templates first (instant)
|
# Step 1: Check local templates first (instant)
|
||||||
mapfile -t LOCAL_TEMPLATES < <(
|
mapfile -t LOCAL_TEMPLATES < <(
|
||||||
pveam list "$TEMPLATE_STORAGE" 2>/dev/null |
|
pveam list "$TEMPLATE_STORAGE" 2>/dev/null |
|
||||||
|
|||||||
Reference in New Issue
Block a user