From a2f35e9b68acf20dd05045db17656eaf2ca7b429 Mon Sep 17 00:00:00 2001 From: Bryce Chidester Date: Mon, 24 Sep 2012 14:45:00 -0700 Subject: [PATCH] Correct wildcard name handling The previous awk function did not work for my system, always returned the script name instead. Replaced with the same clean and sanitary bash variable logic that if_ uses to extract the interface name from $0. --- plugins/network/vnstat_ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/network/vnstat_ b/plugins/network/vnstat_ index f88ad8c1..9fb9c039 100755 --- a/plugins/network/vnstat_ +++ b/plugins/network/vnstat_ @@ -16,7 +16,7 @@ -IFACE=`echo $0 | awk -F_ '{print $1}'` +IFACE=${0##*vnstat_} # Config section