1
0

230-fix-available-interface-parsing.patch 989 B

1234567891011121314151617181920
  1. --- a/munin-node.in
  2. +++ b/munin-node.in
  3. @@ -72,7 +72,7 @@ RES=""
  4. for PLUG in $PLUGINS
  5. do
  6. if [ "$PLUG" = "if_" ]; then
  7. - for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
  8. + for INTER in $(grep -E '^ *(ppp|eth|wlan|ath|ra|ipsec|tap|br-)[^:]{1,}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
  9. do
  10. INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/')
  11. RES="$RES if_$INTERRES"
  12. @@ -80,7 +80,7 @@ do
  13. eval "config_if_${INTERRES}() { config_if $INTER $@; };"
  14. done
  15. elif [ "$PLUG" = "if_err_" ]; then
  16. - for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
  17. + for INTER in $(grep -E '^ *(ppp|eth|wlan|ath|ra|ipsec|tap|br-)[^:]{1,}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g');
  18. do
  19. INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/')
  20. RES="$RES if_err_$INTERRES"