Browse Source

muninlite: Fix parsing the available network interface names

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>
lilik-openwrt-22.03
Martin Blumenstingl 9 years ago
committed by Jonathan McCrohan
parent
commit
bca11d706f
1 changed files with 20 additions and 0 deletions
  1. +20
    -0
      admin/muninlite/patches/230-fix-available-interface-parsing.patch

+ 20
- 0
admin/muninlite/patches/230-fix-available-interface-parsing.patch View File

@ -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"

Loading…
Cancel
Save