Jeremy C. Reed wrote:
My system tells me when my laptop lid opens and closes, when various USB devices are plugged in (or powered on) and removed, and various other events. I see these via log(9) and syslog.I'd like to also see when a CD is physically inserted or DVD drive tray is ejected. Any ideas?I don't see any harm in having the kernel logging that already. Any ideas on where to look?Or any suggestions on how that can be done with kevent/kqueue?
I think Reinoud has this working now with pkgsrc/sysutils/hal, and your applicatoin can listen for those events using dbus.
Cheers, Jared