From 8d36842ee4f02f11d2548f8fbaddfc8bba0407e5 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Sat, 1 Mar 2025 14:22:23 -0500 Subject: [PATCH] addjusted collon to space --- driveAtlas.sh | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/driveAtlas.sh b/driveAtlas.sh index f3d1959..382eb27 100644 --- a/driveAtlas.sh +++ b/driveAtlas.sh @@ -34,13 +34,13 @@ get_drives_info() { declare -A DRIVE_MAPPINGS=( ["medium2"]=" - pci-0000:0c:00.0-ata-3:3 - pci-0000:0c:00.0-ata-4:4 - pci-0000:0c:00.0-ata-5:5 - pci-0000:0c:00.0-ata-6:6 - pci-0000:0d:00.0-nvme-1:11 - pci-0000:0b:00.0-usb-0:3:1.0-scsi-0:0:0:0:usb1 - pci-0000:0b:00.0-usb-0:4:1.0-scsi-0:0:0:0:usb2 + pci-0000:0c:00.0-ata-3 5 + pci-0000:0c:00.0-ata-4 6 + pci-0000:0c:00.0-ata-1 3 + pci-0000:0c:00.0-ata-2 4 + pci-0000:0d:00.0-nvme-1 11 + pci-0000:0b:00.0-usb-0:3:1.0-scsi-0:0:0:0 usb1 + pci-0000:0b:00.0-usb-0:4:1.0-scsi-0:0:0:0 usb2 " ) @@ -48,17 +48,14 @@ build_drive_map() { local host=$(hostname) declare -A drive_map - # Add debug output echo "DEBUG: Current host: $host" echo "DEBUG: Mapping found: ${DRIVE_MAPPINGS[$host]}" local mapping=${DRIVE_MAPPINGS[$host]} if [[ -n "$mapping" ]]; then - while read -r path_slot; do - [[ -z "$path_slot" ]] && continue - local path=${path_slot%:*} - local slot=${path_slot#*:} + while read -r path slot; do + [[ -z "$path" || -z "$slot" ]] && continue echo "DEBUG: Checking path: $path for slot: $slot"