snmpd bad interaction with rc.local (gets emptied when snmpd is restarted)
Username: jordipalet
Origin: https://bugs.openwrt.org/index.php?do=details&task_id=2405
Easy to reproduce:
-
Have something in rc.local
-
Restart snmpd
-
Look again to rc.local is empty
I’ve tested this with several models:
ZBT-WG3526 (16M)
TP-Link Archer C2600
GL.iNet GL-AR300M
TP-LINK Archer C7 v4
SamKnows Whitebox 8
It looks that from time to time, rc.local gets “emptied”.
I’m using cacti to monitor several routers, and from time to time, if an interface is reset (link down, etc.), it looks like cacti gets confused, so I need to restart snmpd.
It looks that that creates the problem, because after that, rc.local is empty.
I’ve been trying to find the problem since I flashed all the routers with 18.06.4 (stable), because initially this was happening when rebooting, so I was not able to find why ... now, I’m almost sure that it is the snmpd restart which creates the problem.