ethtool settings on computer boot
I've searched the archives of the mailing list but havent found a definitive answer to this question. How can I issue this command during system boot: ethtool -s eth1 autoneg off duplex full .. I tried putting it in /etc/boot.local, but apparently boot.local runs before the network settings are touched. OS: SLES 8 kernel: 2.4.x Thanks, Ryan
Ryan McCain wrote:
I've searched the archives of the mailing list but havent found a definitive answer to this question. How can I issue this command during system boot:
ethtool -s eth1 autoneg off duplex full
.. I tried putting it in /etc/boot.local, but apparently boot.local runs before the network settings are touched.
If you really need an ugly hack, here's one possibility: Set up a new service (use /etc/init.d/skeleton as a template) where you define the required services that need to be started. Something like -------/etc/init.d/netduplex------------- ### BEGIN INIT INFO # Provides: netduplex # Required-Start: $network # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: Set full duplex connection # Description: Set full duplex connection after initialization ### END INIT INFO ethtool -s eth1 autoneg off duplex full -------/etc/init.d/netduplex------------- chkconfig netduplex on There you are, a quick and definitely ugly hack!! Sandy
On Tuesday 01 March 2005 1:44 pm, Ryan McCain wrote:
I've searched the archives of the mailing list but havent found a definitive answer to this question. How can I issue this command during system boot:
ethtool -s eth1 autoneg off duplex full
.. I tried putting it in /etc/boot.local, but apparently boot.local runs before the network settings are touched.
OS: SLES 8 kernel: 2.4.x
Thanks, Ryan
http://portal.suse.com/sdb/en/2005/01/dcon_sles9_setting_nic_options.html gives you some ideas also. Bookmark http://portal.suse.com/sdb/en (or whichever language you prefer) as it comes in handy. Haven't found anywhere that they offer a notification when new things are added so check back often. Stan
Ryan McCain wrote:
I've searched the archives of the mailing list but havent found a definitive answer to this question. How can I issue this command during system boot:
ethtool -s eth1 autoneg off duplex full
.. I tried putting it in /etc/boot.local, but apparently boot.local runs before the network settings are touched.
OS: SLES 8 kernel: 2.4.x
From 9.0 Pro's /sbin/ifup: ###################################################################### # call optional and individual scripts # if [ "$SCRIPTNAME" = ifup \ -a \( "$BOOTPROTO" != dhcp -o "$DHCP" = yes \) ] ; then # execute global start scripts if [ "$GLOBAL_POST_UP_EXEC" = "yes" ]; then for SCRIPT in if-up.d/*; do [ -d $SCRIPT -o ! -x $SCRIPT ] && continue; # ignore backup files and leftovers from rpm echo $SCRIPT | grep -q '\(\.rpm\(save\|new\)$\)\|\(.~$\)' && continue; debug "executing additional global start script $SCRIPT" $SCRIPT $CONFIG $INTERFACE${IF_ALIAS:+:$IF_ALIAS} \ ${OPTIONS:+-o $OPTIONS} done fi # execute an individual poststart script if available # NOTE: 'eval echo' in the next line is necessary to expand settings # like POST_UP_SCRIPT="~root/bin/foo" for SCRIPT in `eval echo $POST_UP_SCRIPT scripts/$POST_UP_SCRIPT`; do if [ -x "$SCRIPT" -a ! -d "$SCRIPT" ] ; then debug "executing additional start script $SCRIPT" $SCRIPT $CONFIG $INTERFACE${IF_ALIAS:+:$IF_ALIAS} \ ${OPTIONS:+-o $OPTIONS} fi done fi When this runs, the current directory is /etc/sysconfig/network. Your script should contain a virtually identical section. Maybe the directory tree is a bit different, but that should be all. If necessary, change the option GLOBAL_POST_UP in /etc/sysconfig/network/config to "yes" (with the quotes).
participants (4)
-
Darryl Gregorash
-
Ryan McCain
-
Sandy Drobic
-
Stan Glasoe