minor updates in plugintools

Former-commit-id: 85d3d6a099d4b08b1d79d996157e1725e3414809
This commit is contained in:
fbsanchez 2019-02-26 18:16:10 +01:00
parent d177bda2bd
commit c1aaacbc07
1 changed files with 12 additions and 0 deletions

View File

@ -2018,6 +2018,12 @@ sub snmp_walk {
$timeout = $snmp->{timeout};
}
if ($^O =~ /lin/i && "`which snmpwalk`" eq "") {
return {
'error' => 'snmpwalk not found'
};
}
$snmp->{extra} = '' unless defined $snmp->{extra};
if ( defined ($snmp->{version} )
@ -2131,6 +2137,12 @@ sub snmp_get {
$timeout = $snmp->{timeout};
}
if ($^O =~ /lin/i && "`which snmpwalk`" eq "") {
return {
'error' => 'snmpwalk not found'
};
}
$snmp->{extra} = '' unless defined $snmp->{extra};
if ( defined ($snmp->{version} )