better detect megaraid controllers
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 17 Jan 2018 10:57:07 +0000 (11:57 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 17 Jan 2018 10:57:07 +0000 (11:57 +0100)
smart-megaraid.sh

index 5f15891..21e455a 100755 (executable)
@@ -26,7 +26,7 @@ test -r /proc/mdstat && cat /proc/mdstat
 lsblk --noheadings --scsi -o name | while read drive ; do
        test ! -z "$SMART" && smartctl $SMART /dev/$drive > /dev/shm/smart.$drive-out
        smartctl -a /dev/$drive > /dev/shm/smart.$drive
-       if ! grep -q '^# 1' /dev/shm/smart.$drive ; then
+       if egrep -q '(PERC|MegaRaid/DELL)' /dev/shm/smart.$drive ; then
                megaraid $drive
        fi
 done