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
This commit is contained in:
parent
72e31e753d
commit
0e4d169a40
@ -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}"
|
||||
|
Loading…
Reference in New Issue
Block a user