Hi I've been trying to figure out a way to detect when eth0 is plugged in using udev.
dmesg | grep eth0 | tail -1
tg3: eth0: Link is down.
and then when plugged back in:
dmesg | grep eth0 | tail -2
tg3: eth0: Link is up at 100 Mbps, full duplex.
tg3: eth0: Flow control is on for TX and on for RX.
it seems to me some event is happening with eth* (wlan0 shows similar stuff) that udev should be able to detect, but I'm not sure what to put in the rule, what I'm currently trying:
Doesn't work. where rc.inetmon checks dmesg refreshes routing based on the state of eth0. rc.inetmon is +x and has shebang as line #1. I've also tried:
KERNEL=="eth0", RUN+="/etc/rc.d/rc.inet1 restart"
to simply restart the service, no luck there either.
I know there is netplug
but imo a daemon should not be added if udev can do this already.
thanks for looking.
btw- dell d820, core duo, adapter is Broadcomm ( BCM5752), linux 126.96.36.199, zenwalk 4.8