[project @ peter@palfrader.org-20081006121008-cnkfzn2ler3d933h]
authorPeter Palfrader <peter@palfrader.org>
Mon, 6 Oct 2008 12:10:08 +0000 (14:10 +0200)
committerPeter Palfrader <peter@palfrader.org>
Mon, 6 Oct 2008 12:10:08 +0000 (14:10 +0200)
dsa-check-hpacucli: Do not create the 'Failed' array while checking if an entry is in there.  If it doesn't exist that's also good

dsa-nagios-nrpe-config/debian/changelog
dsa-nagios-nrpe-config/dsa-check-hpacucli

index c6a6f8a..74b0ab4 100644 (file)
@@ -1,3 +1,10 @@
+dsa-nagios-nrpe-config (61) unstable; urgency=low
+
+  * dsa-check-hpacucli: Do not create the 'Failed' array while checking if an
+    entry is in there.  If it doesn't exist that's also good.
+
+ -- Peter Palfrader <weasel@debian.org>  Mon, 06 Oct 2008 14:08:30 +0200
+
 dsa-nagios-nrpe-config (60) unstable; urgency=low
 
   * Add dsa-check-raid-areca.
index 4ee5bbe..ce0910e 100755 (executable)
@@ -120,7 +120,7 @@ for my $slot (sort @controllers) {
        # sometimes stuff breaks and they fall back to 10mb/sec.
        for my $drive (@drives) {
                # skip drives that are known to have failed
-               next if (grep {$drive eq $_} @{$status{'Failed'}});
+               next if (exists $status{'Failed'} && grep {$drive eq $_} @{$status{'Failed'}});
                my $type;
                if ($drive =~ /^[0-9]+:[0-9]+$/) { # scsi drives
                        $type = 'SCSI';