From 0e4d169a40e01d74cf5ff399afe049a25543f0f6 Mon Sep 17 00:00:00 2001 From: Gilles Oivier Date: Sun, 18 Sep 2011 14:42:39 +0200 Subject: Fix the Internal Field Seperator when using ethtool ethtool.sh didn't reset the Internal Field Seperator (IFS) properly. It now does, by storing the old IFS to OIFS, which will be used later in the for loop. It also fixes the "ethtool_ring_" option. Reported-by: Alois Schmid X-Gentoo-Bug: 368525 X-Gentoo-Bug-URL: https://bugs.gentoo.org/368525 --- net/ethtool.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/ethtool.sh b/net/ethtool.sh index 21a22b65..fecb7b91 100644 --- a/net/ethtool.sh +++ b/net/ethtool.sh @@ -31,6 +31,7 @@ ethtool_pre_start() { [ -z "${args}" ] && continue # Split on \n + OIFS="${IFS}" local IFS="$__IFS" for p in ${args} ; do @@ -38,6 +39,7 @@ ethtool_pre_start() { local args_pretty="$(_trim "${p}")" # Do nothing if empty [ -z "${args_pretty}" ] && continue + [ "${opt}" = "ring" ] && opt="set-ring" args_pretty="--${opt} $IFACE ${args_pretty}" args="--${opt} $IFACE ${args}" ebegin "ethtool ${args_pretty}" -- cgit v1.2.3