diff options
author | Gilles Oivier <g.olivier@wanadoo.fr> | 2011-09-18 14:42:39 +0200 |
---|---|---|
committer | Christian Ruppert <idl0r@gentoo.org> | 2011-09-18 14:42:39 +0200 |
commit | 0e4d169a40e01d74cf5ff399afe049a25543f0f6 (patch) | |
tree | 0f4c5c1f140294454d6b26d6b7be1406342a643b | |
parent | 72e31e753d06797aca5e2463257e57575313f268 (diff) |
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_<if>" option.
Reported-by: Alois Schmid <alois.schmid@gmx.de>
X-Gentoo-Bug: 368525
X-Gentoo-Bug-URL: https://bugs.gentoo.org/368525
-rw-r--r-- | net/ethtool.sh | 2 |
1 files changed, 2 insertions, 0 deletions
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}" |