Take the 2-minute tour ×

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?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

No, calling mount directly does not cause any Upstart events to be emitted. However, you can use initctl emit to emit the events of your choice. See the initctl(8) manual page.

share|improve this answer
Do you know if there are any plans to add this functionality to upstart? –  Georg Schölly Apr 23 '11 at 8:10
I don't know of any explicit plans (though I know that eventually the idea is to integrate mountall into upstart, so something might tie in with that). I believe you can monitor mounts over a netlink socket, so in that case it ought to be straightforward to write a bridge (like upstart-udev-bridge) that turns mount/unmount events into upstart events. –  Colin Watson Apr 23 '11 at 16:31
Thanks, I'll look into it. –  Georg Schölly Apr 24 '11 at 9:44
add comment

Your Answer


