File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -38,12 +38,21 @@ get_smart_drives()
38
38
done
39
39
}
40
40
41
- # Get list of SATA disks
41
+ # Get list of SATA disks, including older drives that only report an ATA version
42
42
get_sata_drives ()
43
43
{
44
44
for drive in $Drive_list ; do
45
+ lFound=0
45
46
gsata_smart_flag=$( " $smartctl " -i " $drive " | grep -E " SATA Version is:[[:blank:]]" | awk ' {print $4}' )
46
47
if [ " $gsata_smart_flag " = " SATA" ]; then
48
+ lFound=$(( lFound + 1 ))
49
+ else
50
+ gsata_smart_flag=$( " $smartctl " -i " $drive " | grep -E " ATA Version is:[[:blank:]]" | awk ' {print $1}' )
51
+ if [ " $gsata_smart_flag " = " ATA" ]; then
52
+ lFound=$(( lFound + 1 ))
53
+ fi
54
+ fi
55
+ if [ $lFound -gt 0 ]; then
47
56
SATA_list=" $SATA_list $drive "
48
57
SATA_count=$(( SATA_count + 1 ))
49
58
fi
You can’t perform that action at this time.
0 commit comments