ソースを参照

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 <stijn@linux-ipv6.be>
Stijn Tintel 10 年 前
コミット
bee2865492
共有1 個のファイルを変更した4 個の追加0 個の削除を含む
  1. 4
    0
      net/net-snmp/files/snmpd.init

+ 4
- 0
net/net-snmp/files/snmpd.init ファイルの表示

@@ -159,6 +159,10 @@ start_service() {
159 159
 	procd_set_param file $CONFIGFILE
160 160
 	procd_set_param respawn
161 161
 
162
+	for iface in $(ls /sys/class/net 2>/dev/null); do
163
+		procd_append_param netdev "$iface"
164
+	done
165
+
162 166
 	procd_close_instance
163 167
 }
164 168