[TriLUG] Re: setting eth0 to full duplex
Lance A. Brown
lance at bearcircle.net
Wed Mar 3 10:32:53 EST 2004
Ryan Leathers wrote:
> On Thu, 2004-01-29 at 10:41, John Turner wrote:
>
>
>>We use this for forcing the duplex to 100 at boot time.
>>
>># more /sbin/ifup-pre-local
>>#!/bin/sh
>>if test "x$1" = "xeth0"; then
>> /sbin/ifconfig eth0 up
>> /sbin/ethtool -s eth0 autoneg off speed 100 duplex full
>>fi
>>exit 0
RH 9 offers /sbin/ifup-local as a place to put such things.
/etc/sysconfig/network-scripts/ifup-post checks for an executable
/sbin/ifup-local and runs it with the device name as an argument if it
exists. You could do:
#!/bin/sh
case $1 in
eth0)
/sbin/ethtool -s eth0 autoneg off speed 100 duplex full
;;
esac
to force your settings immediately after the regular ifup scripts bring
up the interface.
--[Lance]
--
Carolina Spirit Quest: http://www.carolinaspiritquest.org/
Celebrate The Circle: http://www.angelfire.com/nc/celebratethecircle/
My LiveJournal: http://www.livejournal.com/users/labrown/
More information about the TriLUG
mailing list