Re: laptop restart eth0 automatically on plugin or on awake like a desktop



On 09/06/11 19:35, Brian wrote:
On Thu 09 Jun 2011 at 17:55:50 +0000, Camaleón wrote:

Hum... what happens when you attach a USB device to the computer? Kernel
detects it and DE mounts it based on user's settings. And what happens
when you dettach the key? Kernel (or udev, or both) remove/umount the
device.

You are talking about *devices* here.

I would have thought that something similar happens with an ethernet
device but I've lost the track to udev development and currently I would
not put my hand in the fire for what and how it does.

An ethernet cable is not a device.

But I like your turn of phrase. Go on, get your fingers burnt! udevadm(8)
and unplug and plug the cable back in. See any reaction from udev?

The question remains - Why would plugging or unplugging the ethernet
cable be expected to bring the interface up or down?

This sounds like a job for ifplugd

"ifplugd is a daemon which will automatically configure your ethernet device when a cable is plugged in and automatically de-configure it if the cable is pulled out. This is useful on laptops with onboard network adapters, since it will only configure the interface when a cable is really connected."

Caveat: I've not used ifplugd myself, I have a couple of custom scripts that do various things depending on which interface (Wired/Wireless) is available.
--
Dom


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/4DF127EB.20408@xxxxxxxxx



Relevant Pages

  • Re: udev nach Kernelupdate kaputt
    ... Hast Du devtmpfs einkompiliert? ... IRC war das udev Update schon Ende Mai, ... describes the predictable network interface names in more detail. ... in the kernel configuration. ...
    (de.comp.os.unix.linux.misc)
  • Re: laptop restart eth0 automatically on plugin or on awake like a desktop
    ... no interface coming up. ... The kernel knows what's going on but, ... udev - it produces no event when the state of the cable connection ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Cannot ping other servers
    ... So it appears that eth0 on both RedHat servers use Broadcom NetXtreme ... So the first BCM5708 in Mandriva is now eth2 or any other name. ... When a new network interface is discovered and udev is active, udev creates a persistent naming rule to it. ...
    (comp.os.linux.networking)
  • Re: [patch] Re: 2.6.14-rc5-mm1 - ide-cs broken!
    ... CompactFlash interface directly accessed as an ide device. ... > which may be on a distribution which uses udev or not. ... > and the whole media and device go away as a unit with the card. ... USB devices have secondary controllers between the card and the USB bus. ...
    (Linux-Kernel)
  • Re: Class device namespaces
    ... is no reason to fiddle around with chunks here in userspace. ... That's the wrong reason to reject anything like that. ... This interface is not public at all, ... long as udev is active you can not use it at all. ...
    (Linux-Kernel)