You are not logged in.

#1 2008-12-21 13:54:28

fettouhi
Member
Registered: 2007-05-07
Posts: 745

[Solved] Running ethtool at boot, where to put it

I'm trying to run this command at boot

ethtool -s eth0 speed 1000 duplex full autoneg off

I've put in rc.local put that script runs at the very end of the boot process. I've set up machine to use wicd and I would like that above command runs before wicd is started. How can I do that?

Here is my DAEMONS list

DAEMONS=(syslog-ng !network netfs crond alsa hal fam cups wicd samba stbd avahi-daemon)

Regards

André

Last edited by fettouhi (2008-12-21 20:23:34)

Offline

#2 2008-12-21 14:22:44

sisco311
Member
From: Romania
Registered: 2008-05-23
Posts: 112

Re: [Solved] Running ethtool at boot, where to put it

you can put the line in the wicd daemon:

nano /etc/rc.d/wicd

...
case "$1" in
        start)
                    ethtool -s eth0 speed 1000 duplex full autoneg off
                    ...

or you can create your own daemon:

nano /etc/rc.d/ethtool

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
  start)
    ethtool -s eth0 speed 1000 duplex full autoneg off
    ;;
  stop)
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"
esac
exit 0

save the file and make it executable:

chmod 0755 /etc/rc.d/ethtool

and add it to the daemon list(before the wicd)

DAEMONS=(syslog-ng !network netfs crond alsa hal fam cups ethtool wicd samba stbd avahi-daemon)


don't drink unwashed fruit juice.
i never make predictions, especially about the future.

Offline

#3 2008-12-21 20:23:18

fettouhi
Member
Registered: 2007-05-07
Posts: 745

Re: [Solved] Running ethtool at boot, where to put it

Many thanks!!

Regards

André

Offline

Board footer

Powered by FluxBB