diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-10-08 21:46:09 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-10-08 21:46:09 +0200 |
commit | 83744b24b0eaa2050269d55ec795d5b78da711d9 (patch) | |
tree | 32d084383f73ffe28f5a43669e5de9fe62731f5c /plugins-scripts/check_ifstatus.pl | |
parent | f40fc650f7a49ed6445a8eddf2f1af435592ec7b (diff) | |
download | monitoring-plugins-83744b24b0eaa2050269d55ec795d5b78da711d9.tar.gz |
check_ifstatus: Fix "-n" and "-u" options
Ignore interface if it's specified via "-n" OR "-u", not just when it's
specified via "-n" AND "-u".
Diffstat (limited to 'plugins-scripts/check_ifstatus.pl')
-rwxr-xr-x | plugins-scripts/check_ifstatus.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins-scripts/check_ifstatus.pl b/plugins-scripts/check_ifstatus.pl index 9aa25151..6ec71d14 100755 --- a/plugins-scripts/check_ifstatus.pl +++ b/plugins-scripts/check_ifstatus.pl @@ -176,7 +176,7 @@ foreach $key (keys %ifStatus) { # skip unused interfaces my $ifName = $ifStatus{$key}{$snmpIfDescr}; - if (!defined($ifStatus{$key}{'notInUse'}) || !grep(/^${ifName}/, @unused_ports )) { + if (!defined($ifStatus{$key}{'notInUse'}) && !grep(/^${ifName}/, @unused_ports )) { # check only if interface is administratively up if ($ifStatus{$key}{$snmpIfAdminStatus} == 1 ) { #check only if interface is not excluded |