How do I add ethtool-command at boot?

Somehow, I do believe this is after upgrading to kernel-3.1.0-46, my NIC has defaulted to 10 Mb/s full duplex, and the connection is very unstable - disappearing for an odd minute now and again. I tried setting it manually through the ethtool-command, turning off auto-negotiation and setting the speed without success.

This does the job though:

ethtool -s eth0 advertise 0x008

But how do I add it at boot? Kind of annoying to su and typing that in every time I start up the computer. Help would be very much appreciated :slight_smile:

Nevermind, figured it out :slight_smile:


su -
echo "/sbin/ethtool -s eth0 advertise 0x008" >> /etc/init.d/after.local

On 11/10/2011 02:06 PM, back space wrote:
>
> Nevermind, figured it out :slight_smile:


su -
echo "/sbin/ethtool -s eth0 advertise 0x008">>  /etc/init.d/after.local

solved–good job! and thanks for posting back so those who google in
later have the benefit of your solution!!

hopefully all those who google in realize that ethX may need to be some
other number, and . . .


DD
openSUSE®, the “German Automobiles” of operating systems