From f906a5f4dabf44958897a619a9103605c297c108 Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Fri, 19 Jul 2019 05:59:49 +0200 Subject: [PATCH] Fix error messages on server regarding recognition bridge interfaces OpenWrt uses the naming convention "br-*" for bridge network interfaces. Source: patch "210-add-bridge-devs" from OpenWrt Author: cshore --- munin-node.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/munin-node.in b/munin-node.in index 9ed6467..7a94b68 100755 --- a/munin-node.in +++ b/munin-node.in @@ -72,17 +72,17 @@ RES="" for PLUG in $PLUGINS do if [ "$PLUG" = "if_" ]; then - for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); + for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); do - INTERRES=$(echo $INTER | sed 's/\./VLAN/') + INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/') RES="$RES if_$INTERRES" eval "fetch_if_${INTERRES}() { fetch_if $INTER $@; };" eval "config_if_${INTERRES}() { config_if $INTER $@; };" done elif [ "$PLUG" = "if_err_" ]; then - for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); + for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); do - INTERRES=$(echo $INTER | sed 's/\./VLAN/') + INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/') RES="$RES if_err_$INTERRES" eval "fetch_if_err_${INTERRES}() { fetch_if_err $INTER $@; };" eval "config_if_err_${INTERRES}() { config_if_err $INTER $@; };"