Mixing Upstart with SysV

Daniel L. Miller dmiller at amfes.com
Mon Nov 26 06:52:23 UTC 2012


Using Ubuntu Precise, I have server with a mix of upstart and init.d 
scripts.  I've manually migrated some legacy init.d scripts to Upstart - 
but some of them are overly complicated.  Some might say unnecessarily 
so - they go to great lengths to ensure the startup environment is valid 
- but there's an argument to be made for protecting against 
self-inflicted wounds.

At any rate - I've got a simple Upstart script which has "start on 
runlevel [2345]".  This program has a dependency on ClamAV - which does 
not have an Upstart script and is started via SysV.  It appears on boot 
that my service starts before ClamAV - so is unable to connect properly.

What is the least-intrusive way I can have my script wait until ClamAV 
is active before starting?  Add an "initctl emit" to the init.d script 
and change the "start on" section in Upstart?
-- 
Daniel



More information about the upstart-devel mailing list