Re: laptop restart eth0 automatically on plugin or on awake like a desktop
On Tue 07 Jun 2011 at 19:03:28 -0400, Mitchell Laks wrote:
> refers to man 5 interfaces which doesn't seem to explain what software
> is doing the work after the plugin of the ethernet cord... and only
> if auto and not allow-hotplug eth0
I strongly suspect neither the auto nor the allow-hotplug line have
anything to do with your problem. In fact, I cannot see how they could
have any bearing on it. auto eth0 simply allows eth0 to be brought up by
ifup -a whereas allow-hotplug eth0 doesn't.
Let's guess your eth0 stanza in /e/n/i uses dhcp. (A static address
configuration would work immediately the network cable was plugged in).
dhclient is going to have a rough time getting an IP address but the
interface will be brought up without one - as ifconfig will confirm.
Plugging the cable back in at this stage doesn't really cause anything
to happen because dhclient is still on the job (please see the timeout
and retry statements in the dhclient.conf manual) and eventually picks
up an address within 5 minutes. So, if you had been patient . . . .