From 161849219e914cfbe145f0ea69788c65ce27b381 Mon Sep 17 00:00:00 2001 From: Stuart Henderson Date: Tue, 2 Jul 2019 16:52:55 +0100 Subject: [PATCH] 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. --- includes/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/common.php b/includes/common.php index b110c31995..f28a1025fd 100644 --- a/includes/common.php +++ b/includes/common.php @@ -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;