Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.