From 689f2cc999223ca9e85b1d26315fab73e266241e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 1 Jul 2025 15:54:23 +0200 Subject: [PATCH] Update create_lxc.sh --- misc/create_lxc.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/misc/create_lxc.sh b/misc/create_lxc.sh index 87b3c0c0..98b4d68e 100644 --- a/misc/create_lxc.sh +++ b/misc/create_lxc.sh @@ -153,12 +153,14 @@ function select_storage() { exit 202 } - if [[ -z "$DISPLAY_SELECTED" ]]; then + # Validierung gegen STORAGE_MAP + if [[ -z "$DISPLAY_SELECTED" || -z "${STORAGE_MAP[$DISPLAY_SELECTED]+_}" ]]; then whiptail --backtitle "Proxmox VE Helper Scripts" --title "Invalid Selection" \ - --msgbox "No storage selected. Please choose a storage pool to continue." 9 60 - else - break + --msgbox "No valid storage selected. Please choose a storage pool to continue." 9 60 + continue fi + + break done echo "${STORAGE_MAP["$DISPLAY_SELECTED"]}"