From 18b70e7c3929dd817d7bc533ba8dc44c692b7dd0 Mon Sep 17 00:00:00 2001 From: juronja <101410098+juronja@users.noreply.github.com> Date: Tue, 17 Feb 2026 08:12:52 +0000 Subject: [PATCH 1/4] truncating longer strings --- vm/truenas-vm.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vm/truenas-vm.sh b/vm/truenas-vm.sh index 4eef6f398..08f171840 100644 --- a/vm/truenas-vm.sh +++ b/vm/truenas-vm.sh @@ -560,7 +560,11 @@ if [ "$IMPORT_DISKS" == "yes" ]; then SCSI_NR=0 while read -r LSOUTPUT; do - DISKARRAY+=("$LSOUTPUT" "" "OFF") + TRUNCATED="${LSOUTPUT:0:50}" + if [ ${#LSOUTPUT} -gt 50 ]; then + TRUNCATED="${TRUNCATED}..." + fi + DISKARRAY+=("$LSOUTPUT" "$TRUNCATED" "OFF") done < <(ls /dev/disk/by-id | grep -E '^ata-|^nvme-|^usb-' | grep -v 'part') SELECTIONS=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SELECT DISKS TO IMPORT" --checklist "\nSelect disk IDs to import. (Use Spacebar to select)\n" --cancel-button "Exit Script" 20 58 10 "${DISKARRAY[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit From ef54d4fd6ccb899ff2ee3768da7379304f0a9384 Mon Sep 17 00:00:00 2001 From: juronja <101410098+juronja@users.noreply.github.com> Date: Tue, 17 Feb 2026 08:19:06 +0000 Subject: [PATCH 2/4] show no tags --- vm/truenas-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/truenas-vm.sh b/vm/truenas-vm.sh index 08f171840..905d0593f 100644 --- a/vm/truenas-vm.sh +++ b/vm/truenas-vm.sh @@ -567,7 +567,7 @@ if [ "$IMPORT_DISKS" == "yes" ]; then DISKARRAY+=("$LSOUTPUT" "$TRUNCATED" "OFF") done < <(ls /dev/disk/by-id | grep -E '^ata-|^nvme-|^usb-' | grep -v 'part') - SELECTIONS=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SELECT DISKS TO IMPORT" --checklist "\nSelect disk IDs to import. (Use Spacebar to select)\n" --cancel-button "Exit Script" 20 58 10 "${DISKARRAY[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit + SELECTIONS=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SELECT DISKS TO IMPORT" --checklist "\nSelect disk IDs to import. (Use Spacebar to select)\n" --notags --cancel-button "Exit Script" 20 58 10 "${DISKARRAY[@]}" 3>&1 1>&2 2>&3 | tr -d '"') || exit for SELECTION in $SELECTIONS; do ((++SCSI_NR)) From bfa2a45a5447fa407538ef5519cddd89821763e0 Mon Sep 17 00:00:00 2001 From: juronja <101410098+juronja@users.noreply.github.com> Date: Tue, 17 Feb 2026 10:29:52 +0000 Subject: [PATCH 3/4] set truncation to 45 char --- vm/truenas-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/truenas-vm.sh b/vm/truenas-vm.sh index 905d0593f..57d2054fa 100644 --- a/vm/truenas-vm.sh +++ b/vm/truenas-vm.sh @@ -561,7 +561,7 @@ if [ "$IMPORT_DISKS" == "yes" ]; then while read -r LSOUTPUT; do TRUNCATED="${LSOUTPUT:0:50}" - if [ ${#LSOUTPUT} -gt 50 ]; then + if [ ${#LSOUTPUT} -gt 45 ]; then TRUNCATED="${TRUNCATED}..." fi DISKARRAY+=("$LSOUTPUT" "$TRUNCATED" "OFF") From feabc81cfb5256325e492c6e025ec325f1e271d4 Mon Sep 17 00:00:00 2001 From: juronja <101410098+juronja@users.noreply.github.com> Date: Tue, 17 Feb 2026 10:34:06 +0000 Subject: [PATCH 4/4] missed set truncation to 45 --- vm/truenas-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/truenas-vm.sh b/vm/truenas-vm.sh index 57d2054fa..d61ee7533 100644 --- a/vm/truenas-vm.sh +++ b/vm/truenas-vm.sh @@ -560,7 +560,7 @@ if [ "$IMPORT_DISKS" == "yes" ]; then SCSI_NR=0 while read -r LSOUTPUT; do - TRUNCATED="${LSOUTPUT:0:50}" + TRUNCATED="${LSOUTPUT:0:45}" if [ ${#LSOUTPUT} -gt 45 ]; then TRUNCATED="${TRUNCATED}..." fi