10-20-2011
Ethtool script not running on boot.
Hi, there is an incompatibility between my NIC and my Western Digital Powerline adapters which appears to cause autonegotiation to fail intermittently, most often following a reboot. Running the following Ethtool script will establish a connection immediately:
#!/bin/sh
# chkconfig: 345 85 15
ETHTOOL="/usr/sbin/ethtool"
DEV="eth0"
SPEED="100 duplex full"
case "$1" in
start)
echo -n "Setting eth0 speed 100 duplex full...";
$ETHTOOL -s $DEV speed $SPEED;
echo " done.";;
stop)
;;
esac
exit 0
I have tried placing this script in /etc/init.d, and it is shown as a selected option when running ntsysv but to no avail.
The recommended method for Fedora is to add ETHTOOL_OPTS="speed 100 duplex full autoneg off" to /etc/sysconfig/network-scripts/ifcfg-NameOfConnection which again is not working.
I'm running Fedora 15 64-bit, NIC = Intel 82562V-2 10/100.
If anyone is able to help out then they would probably save my hair from being wrenched out. Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi there! I tried to search for something like this here but couldn't find anything. I need to run a specific program when linux starts up. I need to run it after the rp-pppoe has started because this prog needs internet connection.
I start the program by entering ./dynix start (its in my home... (4 Replies)
Discussion started by: D-Lexy
4 Replies
2. Filesystems, Disks and Memory
How can I compile a code that can be runned on boot:?? (2 Replies)
Discussion started by: d4n1l0d
2 Replies
3. Ubuntu
I have two systems in my computer . I update the ubuntu system these days and always interrupt it and exit the system . now the system cannot boot after Running local boot scripts(/etc/rc.local), it just stops there. i have to terminate the gnome display manager. what can i do with it ? thank... (0 Replies)
Discussion started by: tcb3210
0 Replies
4. Solaris
Hi,
i have a script which need to do behave differently when run as a startup process from init.d/ rc2.d script and when run manually from shell.
How do i distinguish whether my script is run by init process or by shell??
Will the command
/proc/$$/psinfo | grep "myscript" work well???... (2 Replies)
Discussion started by: vickylife
2 Replies
5. Shell Programming and Scripting
Hi,
I am uising Suse linux on my system and i tried :
man ethtool and i got the manual for ethtool but when i tried to use the command as:
ethtool -a eth0
it says Command not found.
also, i tried rpm -qa|grep ethtool i got:
ethtool-3-15.2 so,it means my system has ethtool server or... (4 Replies)
Discussion started by: salil2012
4 Replies
6. Programming
Hi,
I'm using ethtool to change network settings:
Just for the experiment, i want to change speed to 10, instead of 100,
I type:
ethtool -s eth0 speed 10 duplex full autoneg off
and to view settings i type:
ethtool eth0, and get this:
Settings for eth0:
Supported ports:
... (4 Replies)
Discussion started by: alex889
4 Replies
7. UNIX for Dummies Questions & Answers
dears
am having solaris 10, and i would like to know if the NTP service is running when the OS staritng?on the other hand how can i make it start at the boot up?note the ntp is managed by the SMF in solaris 10.
thanks a lot (2 Replies)
Discussion started by: thehero
2 Replies
8. Shell Programming and Scripting
I am using blow script :--
#!/bin/bash
FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not
if
then
# echo "process found"
exit 0;
else
echo "process not found"
exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
Discussion started by: ketanraut
1 Replies
9. Red Hat
Dear community, as already done tons of times, I prepare the RedHat installation on VMWare, then clone it with clonezilla, and finally restore it on final server. Due to different hrdware, I have to boot from rhel-server-7.4-x86_64-boot.iso cd and rewrite the initramfs that contains the hardware... (3 Replies)
Discussion started by: Lord Spectre
3 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I am trying to find my NIC card speed in centos 5. But i am unable to get the info using ethtool command.
# ethtool eth0
Settings for eth0:
Link detected: yes
and even tried to look for the file # cd /sys/class/net/eth0/speed files which is also not available.... (8 Replies)
Discussion started by: sravani25
8 Replies
reboot(1M) reboot(1M)
NAME
reboot - restart the operating system
SYNOPSIS
/usr/sbin/reboot [-dlnq] [boot_arguments]
The reboot utility restarts the kernel. The kernel is loaded into memory by the PROM monitor, which transfers control to the loaded kernel.
Although reboot can be run by the super-user at any time, shutdown(1M) is normally used first to warn all users logged in of the impending
loss of service. See shutdown(1M) for details.
The reboot utility performs a sync(1M) operation on the disks, and then a multi-user reboot is initiated. See init(1M) for details. On
systems, reboot may also update the boot archive as needed to ensure a successful reboot.
The reboot utility normally logs the reboot to the system log daemon, syslogd(1M), and places a shutdown record in the login accounting
file /var/adm/wtmpx. These actions are inhibited if the -n or -q options are present.
Normally, the system reboots itself at power-up or after crashes.
The following options are supported:
-d Force a system crash dump before rebooting. See dumpadm(1M) for information on configuring system crash dumps.
-l Suppress sending a message to the system log daemon, syslogd(1M) about who executed reboot.
-n Avoid calling sync(2) and do not log the reboot to syslogd(1M) or to /var/adm/wtmpx. The kernel still attempts to sync
filesystems prior to reboot, except if the -d option is also present. If -d is used with -n, the kernel does not attempt to
sync filesystems.
-q Quick. Reboot quickly and ungracefully, without shutting down running processes first.
The following operands are supported:
boot_arguments An optional boot_arguments specifies arguments to the uadmin(2) function that are passed to the boot program and kernel
upon restart. The form and list of arguments is described in the boot(1M) and kernel(1M) man pages.. If the arguments are
specified, whitespace between them is replaced by single spaces unless the whitespace is quoted for the shell. If the
boot_arguments begin with a hyphen, they must be preceded by the -- delimiter (two hyphens) to denote the end of the reboot
argument list.
Example 1: Passing the -r and -v Arguments to boot
In the following example, the delimiter -- (two hyphens) must be used to separate the options of reboot from the arguments of boot(1M).
example# reboot -dl -- -rv
Example 2: Rebooting Using a Specific Disk and Kernel
The following example reboots using a specific disk and kernel.
example# reboot disk1 kernel.test/unix
/var/adm/wtmpx login accounting file
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
mdb(1), boot(1M), dumpadm(1M), fsck(1M), halt(1M), init(1M), kernel(1M), shutdown(1M), sync(1M), syslogd(1M), sync(2), uadmin(2),
reboot(3C), attributes(5)
The reboot utility does not execute the scripts in /etc/rcnum.d or execute shutdown actions in inittab(4). To ensure a complete shutdown
of system services, use shutdown(1M) or init(1M) to reboot a Solaris system.
11 Apr 2005 reboot(1M)