Commit 7a8ba46f authored by Erik Alexandre Pucci's avatar Erik Alexandre Pucci

collect/disk.tree: Add scsi to the disk types before disk model search

This allows the disk model to be correctly collected even in systems with
scsi as disk connection type.
Signed-off-by: 's avatarErik Alexandre Pucci <eap08@c3sl.ufpr.br>
Acked-by: 's avatarAryane Ast dos Santos <aras10@c3sl.ufpr.br>
parent 99241179
......@@ -94,6 +94,9 @@ if test -d "/dev/disk/by-id/"; then
# If "/proc/mdstat" exists, than check for RAID disks
test -f "/proc/mdstat" && raid=true
# Add scsi to accept machines with only scsi as disk type
diskType="${diskType}\|scsi"
# Verify every disk in "/dev/disk/by-id/", excluding all USB's, unless it's
# the USB used as root by Classmate notebook
for line in $(ls -l --time-style="+%F %R" /dev/disk/by-id/ |
......@@ -104,7 +107,7 @@ if test -d "/dev/disk/by-id/"; then
disks="${disks}<hdd${number}>"
disks="${disks}<model value=\"$(ls -l --time-style="+%F %R"\
/dev/disk/by-id/ | grep "$line$" | awk '{print $8}' | grep "$diskType" |
cut -d"-" -f2-)\" type=\"string\"/>"
head -n 1 | cut -d"-" -f2-)\" type=\"string\"/>"
# Multiply the number of blocks by their standard size
diskSize=$(($(cat /sys/block/$line/size)*512))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment