muninlite: Fix parsing the available network interface names
authorMartin Blumenstingl <[email protected]>
Sat, 7 Nov 2015 17:11:58 +0000 (18:11 +0100)
committerJonathan McCrohan <[email protected]>
Wed, 11 Nov 2015 23:40:14 +0000 (23:40 +0000)
Signed-off-by: Martin Blumenstingl <[email protected]>
Signed-off-by: Jonathan McCrohan <[email protected]>
admin/muninlite/patches/230-fix-available-interface-parsing.patch [new file with mode: 0644]

diff --git a/admin/muninlite/patches/230-fix-available-interface-parsing.patch b/admin/muninlite/patches/230-fix-available-interface-parsing.patch
new file mode 100644 (file)
index 0000000..1e3066b
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/munin-node.in    2015-11-07 17:52:54.000000000 +0100
++++ b/munin-node.in    2015-11-07 18:09:06.117200499 +0100
+@@ -72,7 +72,7 @@
+ 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 @@
+       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"