mirror of
https://github.com/munin-monitoring/muninlite.git
synced 2024-12-22 13:52:13 +01:00
Network interface names: tolerate more than one hyphen
Previously the handling of network interface names allowed something like "foo-bar", but failed over "foo-bar-baz". Thanks to Kai-Uwe Eckhardt.
This commit is contained in:
parent
aad298f892
commit
1b43f16454
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ for PLUG in $PLUGINS; do
|
|||
if_|if_err_)
|
||||
interface_names=$(grep -E '^ *(ppp|eth|wlan|ath|ra|ipsec|tap|br-)[^:]{1,}:' /proc/net/dev | sed 's/^ *//; s/:.*$//')
|
||||
for INTER in $interface_names; do
|
||||
INTERRES=$(echo "$INTER" | sed -e 's/\./VLAN/' -e 's/\-/_/')
|
||||
INTERRES=$(echo "$INTER" | sed -e 's/\./VLAN/' -e 's/\-/_/g')
|
||||
RES="$RES ${PLUG}${INTERRES}"
|
||||
eval "fetch_${PLUG}${INTERRES}() { 'fetch_${PLUG%_}' '$INTER'; }"
|
||||
eval "config_${PLUG}${INTERRES}() { 'config_${PLUG%_}' '$INTER'; }"
|
||||
|
|
Loading…
Reference in a new issue