Carlos, thanks for the report. I can see where this will fail with a separate /usr. This is actually mountall's file though, not upstart's.
One just needs to use an OR and add a check:
start on (mounted MOUNTPOINT=/tmp) or (mounted MOUNTPOINT=/usr)
and then add this to the top
[ -x /usr/bin/find ] || exit 0
If /tmp is mounted before /usr, it will exit 0. if /usr is mounted before /tmp, then we'll just clear out the empty mount point for /tmp, which is actually a good thing. /tmp will be mounted later and we'll clear it out. If /tmp is not its own filesystem this also makes sure it gets cleaned up. Because mounted is a hook point, there's no parallelism to worry about.
Carlos, thanks for the report. I can see where this will fail with a separate /usr. This is actually mountall's file though, not upstart's.
One just needs to use an OR and add a check:
start on (mounted MOUNTPOINT=/tmp) or (mounted MOUNTPOINT=/usr)
and then add this to the top
[ -x /usr/bin/find ] || exit 0
If /tmp is mounted before /usr, it will exit 0. if /usr is mounted before /tmp, then we'll just clear out the empty mount point for /tmp, which is actually a good thing. /tmp will be mounted later and we'll clear it out. If /tmp is not its own filesystem this also makes sure it gets cleaned up. Because mounted is a hook point, there's no parallelism to worry about.
Assigning to myself, merge proposal forthcoming.