From: Alexander Barton Date: Mon, 11 Jan 2010 09:32:22 +0000 (+0100) Subject: More specific test for I/O errors on Mac OS X X-Git-Tag: rel-2~23 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=nagcollect.git;a=commitdiff_plain;h=9d0db7defadefa3d324e264ab5bad68044ac78e6 More specific test for I/O errors on Mac OS X --- diff --git a/client/lib/tests/Disks.tst b/client/lib/tests/Disks.tst index d081608..9c7b045 100644 --- a/client/lib/tests/Disks.tst +++ b/client/lib/tests/Disks.tst @@ -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 \ - | 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 - 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-`