From afd43c019e3a8dbd59bae5b611070e1457666ff4 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sat, 22 Sep 2018 11:34:20 +0200 Subject: [PATCH] net-mgmt/snmp: product info read and interface cleanup changes --- net-mgmt/snmp/Makefile | 1 + .../snmp/src/etc/inc/plugins.inc.d/bsnmpd.inc | 24 +++++++++---------- net-mgmt/snmp/src/www/services_snmp.php | 11 ++++----- 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/net-mgmt/snmp/Makefile b/net-mgmt/snmp/Makefile index bb0b70fbe..a8b08352c 100644 --- a/net-mgmt/snmp/Makefile +++ b/net-mgmt/snmp/Makefile @@ -1,5 +1,6 @@ PLUGIN_NAME= snmp PLUGIN_VERSION= 1.3 +PLUGIN_REVISION= 2 PLUGIN_DEPENDS= bsnmp-regex bsnmp-ucd PLUGIN_COMMENT= End of life, superseded by Net-SNMP plugin PLUGIN_MAINTAINER= franco@opnsense.org diff --git a/net-mgmt/snmp/src/etc/inc/plugins.inc.d/bsnmpd.inc b/net-mgmt/snmp/src/etc/inc/plugins.inc.d/bsnmpd.inc index b0c5885b9..679ab535a 100644 --- a/net-mgmt/snmp/src/etc/inc/plugins.inc.d/bsnmpd.inc +++ b/net-mgmt/snmp/src/etc/inc/plugins.inc.d/bsnmpd.inc @@ -96,11 +96,14 @@ trap := "{$config['snmpd']['trapstring']}" EOD; } - $version = trim(file_get_contents('/usr/local/opnsense/version/opnsense')); - $platform = $g['product_name']; - $sysDescr = "{$g['product_name']} " . php_uname("n") . - " {$version} {$platform} " . php_uname("s") . - " " . php_uname("r") . " " . trim(shell_exec('uname -p')); + $sysDescr = join(' ', array( + $g['product_name'], + $g['product_version'], + php_uname('n'), + php_uname('s'), + php_uname('r'), + $g['product_arch'] + )); $snmpdconf .= <<