Refactor pve_check function and update disk listing
See: https://github.com/community-scripts/ProxmoxVED/issues/1362#issuecomment-3897164396
This commit is contained in:
parent
7789a7f215
commit
684ae3e762
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user