mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
net-snmp: enable AgentX support
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user