don't leave megaraid left-over files
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 17 Feb 2020 20:02:03 +0000 (21:02 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 17 Feb 2020 20:02:03 +0000 (21:02 +0100)
smart-megaraid.sh

index 35db0c9..d91b040 100755 (executable)
@@ -28,6 +28,7 @@ lsblk --noheadings --scsi -o name | while read drive ; do
        smartctl -a /dev/$drive > /dev/shm/smart.$drive
        if egrep -q '(PERC|MegaRaid|DELL)' /dev/shm/smart.$drive ; then
                megaraid $drive
+               rm /dev/shm/smart.$drive
        fi
 done