]> arthur.barton.de Git - nagcollect.git/commitdiff
More specific test for I/O errors on Mac OS X
authorAlexander Barton <alex@barton.de>
Mon, 11 Jan 2010 09:32:22 +0000 (10:32 +0100)
committerAlexander Barton <alex@barton.de>
Mon, 11 Jan 2010 09:32:22 +0000 (10:32 +0100)
client/lib/tests/Disks.tst

index d0816084fdf5ef7bfd0006d200e7c9da39d5a9fc..9c7b0459dbe15a2a14e5b2c5cf6f9200509ff53f 100644 (file)
@@ -8,11 +8,11 @@ if [ `uname` = "Darwin" ]; then
        if [ -n "$offset" ]; then
                # reboot detected in system.log
                error=`LC_ALL=C tail -c "+$offset" /var/log/system.log \
        if [ -n "$offset" ]; then
                # reboot detected in system.log
                error=`LC_ALL=C tail -c "+$offset" /var/log/system.log \
-                | grep "I/O" | grep -v nagcollect | tail -n 1`
+                | grep -i "I/O" | grep -i error | grep -v nagcollect | tail -n 1`
        else
                # no reboot detected in system.log
        else
                # no reboot detected in system.log
-               error=`LC_ALL=C grep "I/O" /var/log/system.log \
-                | grep -v nagcollect | tail -n 1`
+               error=`LC_ALL=C grep -i "I/O" /var/log/system.log \
+                | grep -i error | grep -v nagcollect | tail -n 1`
        fi
        if [ -n "$error" ]; then
                msg=`echo $error | cut -d' ' -f6-`
        fi
        if [ -n "$error" ]; then
                msg=`echo $error | cut -d' ' -f6-`