From 982b6ebfe2cdb1175bc8486135d33b897ad3d6ef Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 28 Jun 2011 14:40:13 -0400 Subject: Allow non-'-s' options in ETHTOOL_OPTS, and allow multiple option types. (#692410, #693583) --- sysconfig/network-scripts/network-functions | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'sysconfig/network-scripts/network-functions') diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 2d3263a2..f6d2f05b 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -153,7 +153,21 @@ source_config () fi } - +ethtool_set() +{ + oldifs=$IFS; + IFS=';'; + for opts in $ETHTOOL_OPTS ; do + IFS=$oldifs; + if [[ "${opts}" =~ [[:space:]]*- ]]; then + /sbin/ethtool $opts + else + /sbin/ethtool -s ${REALDEVICE} $opts + fi + IFS=';'; + done + IFS=$oldifs; +} expand_config () { -- cgit v1.2.1