aboutsummaryrefslogtreecommitdiff
path: root/plugins-scripts
diff options
context:
space:
mode:
authorGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2014-10-08 21:46:09 +0200
committerGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2014-10-08 21:46:09 +0200
commit83744b24b0eaa2050269d55ec795d5b78da711d9 (patch)
tree32d084383f73ffe28f5a43669e5de9fe62731f5c /plugins-scripts
parentf40fc650f7a49ed6445a8eddf2f1af435592ec7b (diff)
downloadmonitoring-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')
-rwxr-xr-xplugins-scripts/check_ifstatus.pl2
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