packages: nagios-plugin-check_raid/check_raid - handle tw_cli raid in INITI...

glen glen at pld-linux.org
Mon Jan 10 18:25:03 CET 2011


Author: glen                         Date: Mon Jan 10 17:25:03 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- handle tw_cli raid in INITIALIZING state

---- Files affected:
packages/nagios-plugin-check_raid:
   check_raid (1.88 -> 1.89) 

---- Diffs:

================================================================
Index: packages/nagios-plugin-check_raid/check_raid
diff -u packages/nagios-plugin-check_raid/check_raid:1.88 packages/nagios-plugin-check_raid/check_raid:1.89
--- packages/nagios-plugin-check_raid/check_raid:1.88	Fri Nov 26 10:50:36 2010
+++ packages/nagios-plugin-check_raid/check_raid	Mon Jan 10 18:24:58 2011
@@ -600,10 +600,14 @@
 		open($fh , '-|', @CMD, 'info', $c, 'unitstatus') or next;
 		my @cstatus;
 		while (<$fh>) {
-			next unless (my($u, $s, $p) = /^(u\d+)\s+\S+\s+(\S+)\s+(\S+)/);
+			next unless (my($u, $s, $p, $p2) = /^(u\d+)\s+\S+\s+(\S+)\s+(\S+)\s+(\S+)/);
 
 			if ($s eq 'OK') {
 				push(@cstatus, "$u:$s");
+
+			} elsif ($s eq 'INITIALIZING') {
+				$status = $ERRORS{WARNING} unless $status;
+				push(@cstatus, "$u:$s $p2");
 
 			} elsif ($s eq 'REBUILDING') {
 				$status = $ERRORS{WARNING} unless $status;
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nagios-plugin-check_raid/check_raid?r1=1.88&r2=1.89&f=u



More information about the pld-cvs-commit mailing list