net-snmp: enable AgentX support
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
This commit is contained in:
parent
f9e96a9169
commit
0368739eac
3 changed files with 14 additions and 3 deletions
|
@ -100,6 +100,7 @@ endef
|
||||||
|
|
||||||
|
|
||||||
SNMP_MIB_MODULES_INCLUDED = \
|
SNMP_MIB_MODULES_INCLUDED = \
|
||||||
|
agentx \
|
||||||
host/hr_device \
|
host/hr_device \
|
||||||
host/hr_disk \
|
host/hr_disk \
|
||||||
host/hr_filesys \
|
host/hr_filesys \
|
||||||
|
@ -141,7 +142,6 @@ SNMP_MIB_MODULES_INCLUDED = \
|
||||||
|
|
||||||
SNMP_MIB_MODULES_EXCLUDED = \
|
SNMP_MIB_MODULES_EXCLUDED = \
|
||||||
agent_mibs \
|
agent_mibs \
|
||||||
agentx \
|
|
||||||
disman/event \
|
disman/event \
|
||||||
disman/schedule \
|
disman/schedule \
|
||||||
hardware \
|
hardware \
|
||||||
|
@ -157,9 +157,9 @@ SNMP_MIB_MODULES_EXCLUDED = \
|
||||||
udp-mib \
|
udp-mib \
|
||||||
utilities \
|
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)
|
TARGET_CFLAGS += $(FPIC)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
config agent
|
config agent
|
||||||
option agentaddress UDP:161
|
option agentaddress UDP:161
|
||||||
|
|
||||||
|
config agentx
|
||||||
|
option agentxsocket /var/run/agentx.sock
|
||||||
|
|
||||||
config com2sec public
|
config com2sec public
|
||||||
option secname ro
|
option secname ro
|
||||||
option source default
|
option source default
|
||||||
|
|
|
@ -15,6 +15,13 @@ snmpd_agent_add() {
|
||||||
echo "agentaddress $agentaddress" >> $CONFIGFILE
|
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() {
|
snmpd_system_add() {
|
||||||
local cfg="$1"
|
local cfg="$1"
|
||||||
config_get syslocation "$cfg" sysLocation
|
config_get syslocation "$cfg" sysLocation
|
||||||
|
@ -199,6 +206,7 @@ start_service() {
|
||||||
config_load snmpd
|
config_load snmpd
|
||||||
|
|
||||||
config_foreach snmpd_agent_add agent
|
config_foreach snmpd_agent_add agent
|
||||||
|
config_foreach snmpd_agentx_add agentx
|
||||||
config_foreach snmpd_system_add system
|
config_foreach snmpd_system_add system
|
||||||
config_foreach snmpd_com2sec_add com2sec
|
config_foreach snmpd_com2sec_add com2sec
|
||||||
config_foreach snmpd_com2sec6_add com2sec6
|
config_foreach snmpd_com2sec6_add com2sec6
|
||||||
|
|
Loading…
Reference in a new issue