There is the mounted
event in upstart, but it is emitted only when the mountall daemon mounts the devices found in /etc/fstab
at startup.
Are there any events that get emitted, when I mount a device afterwards manually using the mount
command or by calling an API?
If not, what would be a suitable workaround?
No, calling
mount
directly does not cause any Upstart events to be emitted. However, you can useinitctl emit
to emit the events of your choice. See the initctl(8) manual page.