From b2366408f643cc9ca080f1264b2cedfe586c41a6 Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Fri, 19 Jul 2019 06:02:42 +0200 Subject: [PATCH] Fix parsing the available network interface names Source: patch "230-fix-available-interface-parsing" from OpenWrt Author: Martin Blumenstingl --- munin-node.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/munin-node.in b/munin-node.in index 7a94b68..0bf6268 100755 --- a/munin-node.in +++ b/munin-node.in @@ -72,7 +72,7 @@ RES="" for PLUG in $PLUGINS do if [ "$PLUG" = "if_" ]; then - for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); + for INTER in $(grep -E '^ *(ppp|eth|wlan|ath|ra|ipsec|tap|br-)[^:]{1,}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); do INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/') RES="$RES if_$INTERRES" @@ -80,7 +80,7 @@ do eval "config_if_${INTERRES}() { config_if $INTER $@; };" done elif [ "$PLUG" = "if_err_" ]; then - for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); + for INTER in $(grep -E '^ *(ppp|eth|wlan|ath|ra|ipsec|tap|br-)[^:]{1,}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); do INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/') RES="$RES if_err_$INTERRES"