Date: Mon, 21 May 2007 23:11:40 +0530 From: "Sastry Tumuluri" <sas3@tumuluri.name> To: freebsd-drivers@freebsd.org Subject: devd is not catching some events? Message-ID: <c315f8d20705211041n6d14e6a2n248349f348a65f43@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Friends, I am trying to use devd to catch and do some extra processing on LINK_UP and LINK_DOWN events for my net interfaces (e.g., notify my admin, log the event, ...). Tried this on both FreeBSD 6.1 and on FreeBSD 6.2. I used the following code (shows LINK_DOWN; wrote similar stuff for LINK_UP): notify 10 { match "type" "LINK_DOWN"; action "logger -s alert: Caught LINK_DOWN on dev: $device-name subsys: $subsystem"; }; Didn't work. I tried the above with both strict match conditions (using vendor, device and class matches) as well as very general (like the above). Didn't work. I ran killed devd and ran it in the foreground with "devd -dD". Then I logged into a different pty and used ifconfig lnc0 down #(lnc0 is my ethernet device). devd doesn't even seem to catch the event (no output at all - both on screen and in syslog). On the other hand, "nomatch" and "attach" messages do seem to get through (I wrote similar stuff for nomatch & attach, and they are showing up at bootup and in syslog). What could I be doing wrong? Regards, ==sas3==
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c315f8d20705211041n6d14e6a2n248349f348a65f43>