I want to somehow get notified if a mount or unmount occurs for a USB drive.
At the moment I use udev and then wait for x seconds for a new entry in /proc/mounts. This works ok if the mounting is automatic. However this won't work if the user unmounts/mounts the device manually.
Is there a way to catch those events?