Have jobs wait until another job has been run

Alex Smith alex at alex-smith.me.uk
Mon Apr 23 19:21:23 BST 2007


Hi,

I'm just playing around with the idea of event based hardware additions. 
I've got it working for BlueZ, my Upstart UDev rules are setup to emit 
events upon the addition/removal of a bluetooth device. I'm going to 
have a job which gets called on the addition of a Bluetooth device which 
starts the bluez job if it isn't already started, and a job which gets 
called on the removal of a Bluetooth device, stopping the bluez job if 
there are no more Bluetooth devices plugged in. However, I want the 
bluetooth-add job to be blocked from being run until the job which 
mounts the filesystems has finished (this will soon be switched to 
event-based mounting). Having something like this:

start on stopped mount ok
start on bluetooth-device-added

won't work since it'll be triggered on either of these, not wait until 
both have occurred. Is there some magic that I can use to do this or 
will I just have to drop in a loop that waits until the filesystem is 
mounted rw?

Thanks,
Alex
-- 
Alex Smith
Frugalware Linux developer - http://www.frugalware.org



More information about the upstart-devel mailing list