| 1 |
Index: pkg-nagios-plugins-contrib/check_backuppc/src/check_backuppc |
| 2 |
=================================================================== |
| 3 |
--- pkg-nagios-plugins-contrib.orig/check_backuppc/src/check_backuppc |
| 4 |
+++ pkg-nagios-plugins-contrib/check_backuppc/src/check_backuppc |
| 5 |
@@ -171,7 +171,7 @@ my @notTooOld; |
| 6 |
|
| 7 |
foreach my $host (@hostsDesired, @hostsExcluded) |
| 8 |
{ |
| 9 |
- if (not grep {/$host/} keys(%Status)) |
| 10 |
+ if (not grep {$_ eq $host} keys(%Status)) |
| 11 |
{ |
| 12 |
print("BACKUPPC UNKNOWN - Unknown host ($host)\n"); |
| 13 |
exit $ERRORS{'UNKNOWN'}; |
| 14 |
@@ -182,8 +182,8 @@ foreach my $host (@hostsDesired, @hostsE |
| 15 |
foreach my $host (sort(keys(%Status))) |
| 16 |
{ |
| 17 |
next if $host =~ /^ /; |
| 18 |
- next if (@hostsDesired and not grep {/$host/} @hostsDesired); |
| 19 |
- next if (@hostsExcluded and grep {/$host/} @hostsExcluded); |
| 20 |
+ next if (@hostsDesired and not grep {$_ eq $host} @hostsDesired); |
| 21 |
+ next if (@hostsExcluded and grep {$_ eq $host} @hostsExcluded); |
| 22 |
next if ($backupOnly and $Status{$host}{'type'} eq 'archive'); |
| 23 |
next if ($archiveOnly and $Status{$host}{'type'} ne 'archive'); |
| 24 |
$hostCount++; |