diff options
author | Luke McKee <hojuruku@gmail.com> | 2016-07-26 21:17:31 +0700 |
---|---|---|
committer | Luke McKee <hojuruku@gmail.com> | 2016-07-26 21:17:42 +0700 |
commit | e55da65b149c742c6430cf8de62f37c7074f0108 (patch) | |
tree | ed4ee548b4f3ea8857cb20cb0f8ad7533aed4828 /net/mini_snmpd/files | |
parent | 144812d5c9271f3cabb7c6f8e6a97a3bc7ba4928 (diff) |
mini_snmpd: fix initscript to use l3_device
for working out the interface name
Working:
ubus -S call network.interface dump|jsonfilter -e "@.interface[@.interface=\"wan\"].l3_device"
Broken:
ubus -S call network.interface dump|jsonfilter -e "@.interface[@.interface=\"wan\"].device"
Fix run tested:
root@wifi:/overlay/upper# ps |grep mini_snmpd
1404 root 980 S /usr/bin/mini_snmpd -n -c public -L Undisclosed -C VGB <admin@victimsofgaybullying.com> -t 1 -a -d /overlay,/tmp -i br-lan,pppoe-w
Before it wasn't using the pppoe interface it was using the parent
interface eth0 twice. Small 1 line fix. Merge at your convenience.
Signed-off-by: Luke McKee <hojuruku@gmail.com>
Diffstat (limited to 'net/mini_snmpd/files')
-rw-r--r-- | net/mini_snmpd/files/mini_snmpd.init | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mini_snmpd/files/mini_snmpd.init b/net/mini_snmpd/files/mini_snmpd.init index 442e350af..0fb63d4d8 100644 --- a/net/mini_snmpd/files/mini_snmpd.init +++ b/net/mini_snmpd/files/mini_snmpd.init @@ -71,7 +71,7 @@ append_interface() { local name="$1" netdev netdev_count [ -z $netdev_count ] && netdev_count=0 # for the purposes of snmp monitoring it doesn't need to be up, it just needs to exist in /proc/net/dev - netdev=$(ubus -S call network.interface dump|jsonfilter -e "@.interface[@.interface=\"$name\"].device") + netdev=$(ubus -S call network.interface dump|jsonfilter -e "@.interface[@.interface=\"$name\"].l3_device") if [ -n "$netdev" ] && grep -qF "$netdev" /proc/net/dev ]; then [ $netdev_count -ge 4 ] && { _err "$cfg: too many network interfaces configured, ignoring $name" |