mini_snmpd: fix bugs and automatically reload daemon if one of monitored interfaces... 3349/head
authorMarcin Jurkowski <marcin1j@gmail.com>
Sat, 15 Oct 2016 18:52:21 +0000 (20:52 +0200)
committerMarcin Jurkowski <marcin1j@gmail.com>
Wed, 5 Apr 2017 09:24:40 +0000 (11:24 +0200)
commitbddaabafbfdbc054e0096685b57ad72cb08bdd50
tree5b44fe4a4cfc82efce252e0db503fac616c573ba
parent0638d6abe7ba95de67951b9bfbd63f54352d4d06
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>
net/mini_snmpd/Makefile
net/mini_snmpd/files/mini_snmpd.init