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

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: default avatarErik Alexandre Pucci <>
Acked-by: default avatarAryane Ast dos Santos <>
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
# 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}<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