mini_snmpd: fix bugs and automatically reload daemon if one of monitored interfaces goes up/down

This commit fixes bugs, cleans and enhances init.d script:
1. The first disk and interface was passed to mini_snmpd with extra
   leading space.
   This bug caused the first monitored disk and interface to be
   inaccessible by SNMP daemon.
2. Automatically reload deamon if one of monitored interfaces goes
   up/down.
   Since mini_snmpd reads interface list only at startup, it won't
   detect any interface which appeared after the daemon was started.
   Fortunately we can use procd interface triggers to automatically
   restart the daemon.
3. Replace hand-written direct ubus calls and json data filtering with
   standard network functions.

Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
This commit is contained in:
Marcin Jurkowski
2016-10-15 20:52:21 +02:00
parent 0638d6abe7
commit bddaabafbf
2 changed files with 26 additions and 29 deletions
+2 -2
View File
@@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=mini_snmpd
PKG_VERSION:=1.4-rc1
PKG_RELEASE:=2
PKG_MAINTAINER:=Luke McKee <hojuruku@gmail.com>
PKG_RELEASE:=3
PKG_MAINTAINER:=Marcin Jurkowski <marcin1j@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING