/sys/class/net/eth?/carrier and uevents
Hello,
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.
Thanks in advance,
João.
Quoted 3 lines · João Luis Meloni Assirati
Hello,
Hi,
Quoted 10 lines
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 :)
Signature · 3 lines
Jesper Juhl <[email protected]> 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
Quoted 7 lines
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 :)
there is a netlink event already though... is this really worth the duplication?
Quoted 11 lines · Arjan van de Ven
Quoted 7 lines
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 :)
there is a netlink event already though... is this really worth the duplication?
Dunno, perhaps not. Have not looked at it yet. If it's simple to add and there won't be any confusion for userspace as to what event to react to, then it might be a nice little thing to have.
Signature · 3 lines
Jesper Juhl <[email protected]> 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
Em Seg 29 Mai 2006 18:33, Arjan van de Ven escreveu:
Quoted 8 lines
Quoted 5 lines
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 :)
there is a netlink event already though... is this really worth the duplication?
IMHO the ability to substitute a daemon with a simple udev rule, together with the benefit of notification by d-bus to the user interface (say KDE) makes it worth.
Regards,
João.