usbs are split

This commit is contained in:
2025-03-01 13:11:59 -05:00
parent 628111f477
commit aa6eca3713

View File

@ -53,10 +53,10 @@ get_physical_mapping() {
declare -A DRIVE_MAPPINGS=(
["medium2"]="
pci-0000:0c:00.0-ata-3:5
pci-0000:0c:00.0-ata-4:6
pci-0000:0c:00.0-ata-1:4
pci-0000:0c:00.0-ata-2:5
pci-0000:0c:00.0-ata-1:1
pci-0000:0c:00.0-ata-2:2
pci-0000:0c:00.0-ata-3:3
pci-0000:0c:00.0-ata-4:4
pci-0000:0d:00.0-nvme-1:11
"
["large1"]=""
@ -145,11 +145,8 @@ generate_medium2_layout() {
printf " ┌────────┐ ┌────────┐\n"
usb_drives=$(ls -l /dev/disk/by-path/pci-0000:0b:00.0-usb* 2>/dev/null | awk -F'/' '{print $NF}')
if [ -n "$usb_drives" ]; then
for usb_drive in $(echo "$usb_drives"); do
printf " │ %-6s │ │ │\n" "$usb_drive"
done
else
printf " │ EMPTY │ │ EMPTY │\n"
read -r drive1 drive2 <<< $(echo "$usb_drives")
printf " │ %-6s │ │ %-6s │\n" "${drive1:-EMPTY}" "${drive2:-EMPTY}"
fi
printf " └────────┘ └────────┘\n\n"