aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/network-functions
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2011-06-28 14:40:13 -0400
committerBill Nottingham <notting@redhat.com>2011-06-28 14:40:13 -0400
commit982b6ebfe2cdb1175bc8486135d33b897ad3d6ef (patch)
treea929c59ca89fcd53bb3d194f2e04148cdc03842a /sysconfig/network-scripts/network-functions
parent103b0cc1dd6f5c1ad903076f7c362fb0397edfc8 (diff)
downloadinitscripts-982b6ebfe2cdb1175bc8486135d33b897ad3d6ef.tar
initscripts-982b6ebfe2cdb1175bc8486135d33b897ad3d6ef.tar.gz
initscripts-982b6ebfe2cdb1175bc8486135d33b897ad3d6ef.tar.bz2
initscripts-982b6ebfe2cdb1175bc8486135d33b897ad3d6ef.tar.xz
initscripts-982b6ebfe2cdb1175bc8486135d33b897ad3d6ef.zip
Allow non-'-s' options in ETHTOOL_OPTS, and allow multiple option types. (#692410, #693583)
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r--sysconfig/network-scripts/network-functions16
1 files changed, 15 insertions, 1 deletions
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 ()
{