Merge pull request #1456 from heinemannj/truenas-vm
Some checks failed
Update GitHub Versions (New) / update-github-versions (push) Has been cancelled
Crawl Versions from newreleases.io / crawl-versions (push) Has been cancelled
Crawl Versions from github / crawl-versions (push) Has been cancelled

truenas-vm: Refactor pve_check function and update disk listing
This commit is contained in:
CanbiZ (MickLesk) 2026-02-14 09:12:11 +01:00 committed by GitHub
commit fe369825a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -182,7 +182,7 @@ function check_root() {
fi
}
pve_check() {
function pve_check() {
local PVE_VER
PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
@ -533,7 +533,7 @@ if [ "$IMPORT_DISKS" == "yes" ]; then
while read -r LSOUTPUT; do
DISKARRAY+=("$LSOUTPUT" "" "OFF")
done < <(ls /dev/disk/by-id | grep -E '^ata-|^nvme-' | grep -v 'part')
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