Author: glen                         Date: Wed Mar 31 08:26:38 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- take different approach, not to fail into same pit again

---- Files affected:
packages/nagios-plugin-check_raid:
   check_raid (1.71 -> 1.72) 

---- Diffs:

================================================================
Index: packages/nagios-plugin-check_raid/check_raid
diff -u packages/nagios-plugin-check_raid/check_raid:1.71 
packages/nagios-plugin-check_raid/check_raid:1.72
--- packages/nagios-plugin-check_raid/check_raid:1.71   Wed Mar 31 10:07:34 2010
+++ packages/nagios-plugin-check_raid/check_raid        Wed Mar 31 10:26:33 2010
@@ -793,12 +793,15 @@
                open(my $fh , '-|', @CMD, $c) or die $!;
                while (<$fh>) {
                        chomp;
-                       # /dev/cciss/c0d0: (Smart Array P400i) RAID 1 Volume 0 
status: OK.
-                       if (my($state, $s) = /(.*status: (.*?))\.\s*$/) {
+                       # strip for better pattern matching
+                       s/\.\s*$//;
+
+                       # /dev/cciss/c0d0: (Smart Array P400i) RAID 1 Volume 0 
status: OK
+                       if (my($s) = /status: (.*?)$/) {
                                if ($s ne 'OK') {
                                        $status = $ERRORS{CRITICAL};
                                }
-                               push(@status, $state);
+                               push(@status, $_);
                        }
                }
                close($fh);
================================================================

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

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to