summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTon Voon <ton.voon@opsera.com>2010-07-07 09:56:21 +0100
committerTon Voon <ton.voon@opsera.com>2010-07-07 09:56:21 +0100
commit0205c7c0cfc5ba182f2cb675d1df4de72f13c9e2 (patch)
tree0b93504da05b4fd02c72dc42efb25397ffef83d5
parentcf2bcf6c7afa8eb7a54e01f98a9998a7e1ac0852 (diff)
downloadmonitoring-plugins-0205c7c0cfc5ba182f2cb675d1df4de72f13c9e2.tar.gz
Allow check_ifstatus to accept version=2c
-rw-r--r--NEWS1
-rw-r--r--THANKS.in1
-rwxr-xr-xplugins-scripts/check_ifstatus.pl7
3 files changed, 7 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 79ddc535..dc2092db 100644
--- a/NEWS
+++ b/NEWS
@@ -30,6 +30,7 @@ This file documents the major additions and syntax changes between releases.
30 Fix parsing of multi-line strings in check_snmp (broken in 1.4.14) and enhance output in such case (#2832451) 30 Fix parsing of multi-line strings in check_snmp (broken in 1.4.14) and enhance output in such case (#2832451)
31 Fix detection of pst3 64-bit compile flags with Sun CC 31 Fix detection of pst3 64-bit compile flags with Sun CC
32 Fix cmd_run overwriting the environment, which would break some commands that needed it 32 Fix cmd_run overwriting the environment, which would break some commands that needed it
33 Allow check_ifstatus to accept version=2c - used to only allow version=2 (Brian Landers)
33 WARNINGS 34 WARNINGS
34 Updated developer documentation to say that performance labels should not have an equals sign or 35 Updated developer documentation to say that performance labels should not have an equals sign or
35 single quote in the label 36 single quote in the label
diff --git a/THANKS.in b/THANKS.in
index 0b1dab6c..6666de4f 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -264,3 +264,4 @@ Josip Rodin
264Dann Frazier 264Dann Frazier
265Stephane Chazelas 265Stephane Chazelas
266Craig Leres 266Craig Leres
267Brian Landers
diff --git a/plugins-scripts/check_ifstatus.pl b/plugins-scripts/check_ifstatus.pl
index 22638234..63c71ffa 100755
--- a/plugins-scripts/check_ifstatus.pl
+++ b/plugins-scripts/check_ifstatus.pl
@@ -280,7 +280,7 @@ sub process_arguments() {
280 $status = GetOptions( 280 $status = GetOptions(
281 "V" => \$opt_V, "version" => \$opt_V, 281 "V" => \$opt_V, "version" => \$opt_V,
282 "h" => \$opt_h, "help" => \$opt_h, 282 "h" => \$opt_h, "help" => \$opt_h,
283 "v=i" => \$snmp_version, "snmp_version=i" => \$snmp_version, 283 "v=s" => \$snmp_version, "snmp_version=s" => \$snmp_version,
284 "C=s" => \$community,"community=s" => \$community, 284 "C=s" => \$community,"community=s" => \$community,
285 "L=s" => \$seclevel, "seclevel=s" => \$seclevel, 285 "L=s" => \$seclevel, "seclevel=s" => \$seclevel,
286 "a=s" => \$authproto, "authproto=s" => \$authproto, 286 "a=s" => \$authproto, "authproto=s" => \$authproto,
@@ -317,7 +317,10 @@ sub process_arguments() {
317 $timeout = $TIMEOUT; 317 $timeout = $TIMEOUT;
318 } 318 }
319 319
320 if ($snmp_version !~ /[123]/){ 320 # Net::SNMP wants an integer
321 $snmp_version = 2 if $snmp_version eq "2c";
322
323 if ($snmp_version !~ /^[123]$/){
321 $state='UNKNOWN'; 324 $state='UNKNOWN';
322 print ("$state: No support for SNMP v$snmp_version yet\n"); 325 print ("$state: No support for SNMP v$snmp_version yet\n");
323 exit $ERRORS{$state}; 326 exit $ERRORS{$state};