[nagiosplug] Fix Debian bug #574612: Return WARNING on rebuild

"Holger Weiss" <[email protected]>
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
 Module: nagiosplug
 Branch: master
 Commit: 753b88408833702dbcf004e00a846550c2a0e952
 Author: Holger Weiss <[email protected]>
   Date: Mon Apr 12 15:55:18 2010 +0200
    URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=753b884

Fix Debian bug #574612: Return WARNING on rebuild

Let check_linux_raid return a WARNING instead of an OK state during
volume recovery.

See: http://bugs.debian.org/574612

(Fixed by Christoph Martin, forwarded by Jan Wagner.)

---

 contrib/check_linux_raid.pl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/contrib/check_linux_raid.pl b/contrib/check_linux_raid.pl
index c7c9c55..d2e5b46 100644
--- a/contrib/check_linux_raid.pl
+++ b/contrib/check_linux_raid.pl
@@ -64,6 +64,7 @@ while(defined $nextdev){
 			} elsif (/recovery = (.*?)\s/) {  
 				$recovery{$device} = $1;
 				($finish{$device}) = /finish=(.*?min)/;
+				$device=undef;
 			} elsif (/^\s*$/) {
 				$device=undef;
 			}


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.