lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

commit 0368739eacddb80efd6234def22370a8c8222935
parent f9e96a91692a9c050d3d103ab7543ebd403540a0
Author: Stijn Tintel <stijn@linux-ipv6.be>
Date:   Sat, 31 Dec 2016 14:29:01 +0100

net-snmp: enable AgentX support

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

Diffstat:
Mnet/net-snmp/Makefile | 6+++---
Mnet/net-snmp/files/snmpd.conf | 3+++
Mnet/net-snmp/files/snmpd.init | 8++++++++
3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/net/net-snmp/Makefile b/net/net-snmp/Makefile @@ -100,6 +100,7 @@ endef SNMP_MIB_MODULES_INCLUDED = \ + agentx \ host/hr_device \ host/hr_disk \ host/hr_filesys \ @@ -141,7 +142,6 @@ SNMP_MIB_MODULES_INCLUDED = \ SNMP_MIB_MODULES_EXCLUDED = \ agent_mibs \ - agentx \ disman/event \ disman/schedule \ hardware \ @@ -157,9 +157,9 @@ SNMP_MIB_MODULES_EXCLUDED = \ udp-mib \ utilities \ -SNMP_TRANSPORTS_INCLUDED = Callback UDP +SNMP_TRANSPORTS_INCLUDED = Callback UDP Unix -SNMP_TRANSPORTS_EXCLUDED = TCP TCPIPv6 Unix +SNMP_TRANSPORTS_EXCLUDED = TCP TCPIPv6 TARGET_CFLAGS += $(FPIC) diff --git a/net/net-snmp/files/snmpd.conf b/net/net-snmp/files/snmpd.conf @@ -1,6 +1,9 @@ config agent option agentaddress UDP:161 +config agentx + option agentxsocket /var/run/agentx.sock + config com2sec public option secname ro option source default diff --git a/net/net-snmp/files/snmpd.init b/net/net-snmp/files/snmpd.init @@ -15,6 +15,13 @@ snmpd_agent_add() { echo "agentaddress $agentaddress" >> $CONFIGFILE } +snmpd_agentx_add() { + local cfg="$1" + echo "master agentx" >> $CONFIGFILE + config_get agentxsocket "$cfg" agentxsocket + [ -n "$agentxsocket" ] && echo "agentXSocket $agentxsocket" >> $CONFIGFILE +} + snmpd_system_add() { local cfg="$1" config_get syslocation "$cfg" sysLocation @@ -199,6 +206,7 @@ start_service() { config_load snmpd config_foreach snmpd_agent_add agent + config_foreach snmpd_agentx_add agentx config_foreach snmpd_system_add system config_foreach snmpd_com2sec_add com2sec config_foreach snmpd_com2sec6_add com2sec6