aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-06-27 20:15:25 +0000
committerBill Nottingham <notting@redhat.com>2003-06-27 20:15:25 +0000
commitc49ae566f4f7c58a79b32a8fc17005c0f9495402 (patch)
tree0775788b069e387c8971e2767a9ddf3b20c9ed44
parentc8b2bc2f85ae344705b995778fa2c5bb2d31ff72 (diff)
downloadinitscripts-c49ae566f4f7c58a79b32a8fc17005c0f9495402.tar
initscripts-c49ae566f4f7c58a79b32a8fc17005c0f9495402.tar.gz
initscripts-c49ae566f4f7c58a79b32a8fc17005c0f9495402.tar.bz2
initscripts-c49ae566f4f7c58a79b32a8fc17005c0f9495402.tar.xz
initscripts-c49ae566f4f7c58a79b32a8fc17005c0f9495402.zip
support setting device options with ethtool opts
-rw-r--r--sysconfig.txt7
-rwxr-xr-xsysconfig/network-scripts/ifup8
2 files changed, 15 insertions, 0 deletions
diff --git a/sysconfig.txt b/sysconfig.txt
index 1df63156..2e498285 100644
--- a/sysconfig.txt
+++ b/sysconfig.txt
@@ -617,6 +617,13 @@ Files in /etc/sysconfig/network-scripts/
Managed from /etc/sysconfig/network-scripts/ifup-ipx
ARP=yes|no (adds 'arp' flag to ifconfig, for use with the
ethertap device)
+ ETHTOOL_OPTS=...
+ Any device-specific options supported by ethtool. For example,
+ if you wanted to force 100Mb full duplex:
+ ETHTOOL_OPTS="speed 100 duplex full autoneg off"
+ Note that changing speed or duplex settings almost always
+ requires disabling autonegotiation with 'autoneg off'.
+
No longer supported:
PROMISC=yes|no (enable or disable promiscuous mode)
ALLMULTI=yes|no (enable or disable all-multicast mode)
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 13232704..4aa0b55f 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -236,6 +236,10 @@ if [ -n "${DYNCONFIG}" ]; then
exit 1
fi
+ if [ -n "$ETHTOOL_OPTS" ] ; then
+ /sbin/ethtool -s ${REALDEVICE} $ETHTOOL_OPTS
+ fi
+
# DHCP clients need DNS to be available, and we don't know
# what DNS server they're using until they are done.
FWHACK=
@@ -286,6 +290,10 @@ else
exit 1
fi
+ if [ -n "$ETHTOOL_OPTS" ] ; then
+ /sbin/ethtool -s ${REALDEVICE} $ETHTOOL_OPTS
+ fi
+
if ! arping -q -c 2 -w 3 -D -I ${REALDEVICE} ${IPADDR} ; then
echo $"Error, some other host already uses address ${IPADDR}."
exit 1