From bee2865492fa8321a74627fd15a24c7caf54790d Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Wed, 18 Feb 2015 06:03:54 +0100 Subject: [PATCH] net-snmp: monitor ifindex changes When an ifindex for an interface changes, some monitoring tools can no longer find the interface and send alerts. Monitor all network interfaces via the procd netdev parameter, so that /etc/init.d/snmpd reload will restart snmpd if any ifindex changed. Signed-off-by: Stijn Tintel --- net/net-snmp/files/snmpd.init | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/net-snmp/files/snmpd.init b/net/net-snmp/files/snmpd.init index a26144766..3dd8c41dc 100644 --- a/net/net-snmp/files/snmpd.init +++ b/net/net-snmp/files/snmpd.init @@ -159,6 +159,10 @@ start_service() { procd_set_param file $CONFIGFILE procd_set_param respawn + for iface in $(ls /sys/class/net 2>/dev/null); do + procd_append_param netdev "$iface" + done + procd_close_instance }