diff --git a/net/net-snmp/Makefile b/net/net-snmp/Makefile index 08e36e85b5..3446d15142 100644 --- a/net/net-snmp/Makefile +++ b/net/net-snmp/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=net-snmp PKG_VERSION:=5.7.3 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/net-snmp diff --git a/net/net-snmp/files/snmpd.conf b/net/net-snmp/files/snmpd.conf index e21dc5771d..ac152d83eb 100644 --- a/net/net-snmp/files/snmpd.conf +++ b/net/net-snmp/files/snmpd.conf @@ -83,3 +83,7 @@ config exec option args /proc/sys/fs/file-nr # option miboid 1.2.3.4 +config engineid +# option engineid 'LEDE' + option engineidtype '3' + option engineidnic 'eth0' diff --git a/net/net-snmp/files/snmpd.init b/net/net-snmp/files/snmpd.init index 11dc381b27..7df67de28e 100644 --- a/net/net-snmp/files/snmpd.init +++ b/net/net-snmp/files/snmpd.init @@ -198,6 +198,18 @@ snmpd_disk_add() { echo "$disk $partition $size" >> $CONFIGFILE } +snmpd_engineid_add() { + local cfg="$1" + + config_get engineid "$cfg" engineid + [ -n "$engineid" ] && echo "engineID $engineid" >> $CONFIGFILE + config_get engineidtype "$cfg" engineidtype + [ "$engineidtype" -ge 1 -a "$engineidtype" -le 3 ] && \ + echo "engineIDType $engineidtype" >> $CONFIGFILE + config_get engineidnic "$cfg" engineidnic + [ -n "$engineidnic" ] && echo "engineIDNic $engineidnic" >> $CONFIGFILE +} + start_service() { [ -f "$CONFIGFILE" ] && rm -f "$CONFIGFILE" @@ -221,6 +233,7 @@ start_service() { config_foreach snmpd_pass_add pass config_foreach snmpd_exec_add exec config_foreach snmpd_disk_add disk + config_foreach snmpd_engineid_add engineid procd_set_param command $PROG -Lf /dev/null -f procd_set_param file $CONFIGFILE