From a004ae98dd92dfee89759cc31a583d25dfbc9c18 Mon Sep 17 00:00:00 2001 From: juronja <101410098+juronja@users.noreply.github.com> Date: Fri, 13 Feb 2026 14:09:44 +0000 Subject: [PATCH] reversed the preselect logic --- vm/truenas-vm.sh | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/vm/truenas-vm.sh b/vm/truenas-vm.sh index 4984ef794..5c17ac51a 100644 --- a/vm/truenas-vm.sh +++ b/vm/truenas-vm.sh @@ -299,29 +299,15 @@ function advanced_settings() { done ISOARRAY=() - local last_stable_index=-1 - local current_item=0 - while read -r ISOPATH; do FILENAME=$(basename "$ISOPATH") ISOARRAY+=("$ISOPATH" "$FILENAME" "OFF") - if [[ ! "$FILENAME" =~ (RC|BETA) ]]; then - last_stable_index=$(((current_item * 3) + 2)) - fi - ((++current_item)) done < <(truenas_iso_lookup | sort -V) - if [ ${#ISOARRAY[@]} -eq 0 ]; then echo "No ISOs found." exit 1 fi - if [ "$last_stable_index" -eq -1 ]; then - last_stable_index=$(( (${#ISOARRAY[@]}) - 1 )) - fi - - ISOARRAY[$last_stable_index]="ON" - if SELECTED_ISO=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SELECT ISO TO INSTALL" --notags --radiolist "\nSelect version (BETA/RC/Latest stable):" 20 58 12 "${ISOARRAY[@]}" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then echo -e "${ISO}${BOLD}${DGN}ISO Chosen: ${BGN}$(basename "$SELECTED_ISO")${CL}" else