]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- add $ETHTOOL_OPTS
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 25 Jul 2011 06:10:15 +0000 (06:10 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Mon, 25 Jul 2011 06:10:15 +0000 (06:10 +0000)
svn-id: @12271

doc/net-scripts.txt
sysconfig/network-scripts/ifup

index 268388d2475612677d5d895c90ea0fb40b494766..2af99b12e807df8d7b18f00770975c71341f338a 100644 (file)
@@ -82,6 +82,7 @@ Files in /etc/sysconfig/interfaces/
     ONBOOT=yes|no
     USERCTL=yes|no
     BOOTPROTO=none|bootp|dhcp|pump|zeroconf|auto
+    ETHTOOL_OPTS=
 
   If BOOTPROTO is not "none", then the only other item that
   must be set is the DEVICE item; all the rest will be determined
@@ -92,6 +93,16 @@ Files in /etc/sysconfig/interfaces/
     configuration matrix for IPX.  Only used if IPX is active.
     Managed from /etc/sysconfig/network-scripts/ifup-ipx
 
+  Deprecated, but supported:
+    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'.
+
+      Long term, this should be done by sysadmin-written udev rules.
+
   PPP/SLIP items:
     PERSIST=yes|no
     MODEMPORT=<device, say /dev/modem>
index 06e1327198d6ed9cc5a45fea67aa0dd073b76df2..d252fac273ced2734f816e33c5cc32dc7bf2a527 100755 (executable)
@@ -100,6 +100,10 @@ if is_yes "$SLAVE" && [ -n "$MASTER" -a -x /sbin/ifenslave ]; then
        nls "Enslaving %s to %s" "$DEVICE" "$MASTER"
        ifenslave $RFLAG "$MASTER" "$DEVICE"
 
+       if [ -n "$ETHTOOL_OPTS" ] ; then
+               /sbin/ethtool -s $DEVICE $ETHTOOL_OPTS
+       fi
+
        exit 0
 fi
 
This page took 0.712999 seconds and 4 git commands to generate.