Re: /sys/class/net/eth?/carrier and uevents

From: Jesper Juhl
Date: Mon May 29 2006 - 17:30:08 EST


On 29/05/06, João Luis Meloni Assirati <assirati@xxxxxxxxxxxxxxxx> wrote:

Hello,

Hi,

I would like to have my network interfaces configured when plugged on the
network cable. I know there are some daemons that do this for me (laptop-net,
ifplugd, whereami), but it would be nice if a simple udev rule take care of
this to me. However, as I can see with kernel 2.6.16 and udevmonitor (udev
version 0.091), nonetheless /sys/class/net/eth?/carrier changes when I plug
the network cable, no uevent is generated. Could this be changed so udev get
triggered when network cables get plugged? As I am no kernel developper, this
is only a suggestion, hoping that it would be a simple and pertinent job for
those ho know the subject.


I added the 'carrier' attribute initially but never considered udev at
the time. But I can certainly see how it could be useful.
I'll take a look at adding a hotplug event when I get some spare time
(probably some time next week) - or perhaps someone else will beat me
to it :)

--
Jesper Juhl <jesper.juhl@xxxxxxxxx>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/