From eef090a1aebd1b9ec94451a3f16dde1c244f48ff Mon Sep 17 00:00:00 2001 From: "Kim B. Heino" Date: Fri, 9 Oct 2020 10:10:05 +0300 Subject: [PATCH] muninlite: do not hardcode acceptable network interface names Interface can be called f.ex. "enp0s31f6" in modern system with predictable network names enabled. Allow any name instead of list of hardcoded names. --- muninlite.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/muninlite.in b/muninlite.in index 73584c8..bd90333 100755 --- a/muninlite.in +++ b/muninlite.in @@ -78,7 +78,7 @@ RES="" for PLUG in $PLUGINS; do case "$PLUG" in if_|if_err_) - interface_names=$(grep -E '^ *(ppp|eth|wlan|ath|ra|ipsec|tap|br-)[^:]{1,}:' /proc/net/dev | sed 's/^ *//; s/:.*$//') + interface_names=$(sed 's/^ *//; s/:.*$//; / /d; /^lo$/d' /proc/net/dev) for INTER in $interface_names; do INTERRES=$(echo "$INTER" | sed -e 's/\./VLAN/' -e 's/\-/_/g') RES="$RES ${PLUG}${INTERRES}"