mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Avoid unnecessary net-snmp long options for version info (#10405)
Long option support in net-snmp relies on non-portable usage of getopt(3) with "-:" in the argument string, this doesn't work on all OS. Replace with the alternative -V which works everywhere.
This commit is contained in:
committed by
Neil Lathwood
parent
1183318ba3
commit
161849219e
@@ -1143,7 +1143,7 @@ function version_info($remote = false)
|
||||
Config::get('rrdtool', 'rrdtool') . ' --version |head -n1'
|
||||
)), 1, 1)));
|
||||
$output['netsnmp_ver'] = str_replace('version: ', '', rtrim(shell_exec(
|
||||
Config::get('snmpget', 'snmpget') . ' --version 2>&1'
|
||||
Config::get('snmpget', 'snmpget') . ' -V 2>&1'
|
||||
)));
|
||||
|
||||
return $output;
|
||||
|
Reference in New Issue
Block a user