Upstart config file generation

Steffen Barszus steffenbpunkt at googlemail.com
Mon May 2 05:06:25 UTC 2011


On Sun, 01 May 2011 22:24:15 +0200
Jan Claeys <lists at janc.be> wrote:

> Jan Ceuleers schreef op zo 01-05-2011 om 22:01 [+0200]:
> > I guess that examining /etc/mythtv/config.xml (or in older versions
> > of mythtv /etc/mythtv/mysql.txt) would allow us to detect this, as
> > this file contains the mysql server hostname for mythtv to use. 
> 
> If I understand correctly distros now are forced to create their own
> scripts/hacks that break when MythTV changes a detail in their config
> or database schema?  (Or tell their users to fix it themselves if it
> breaks...)
> 
> I think the best solution is to either make MythTV a bit more clever
> so that it just waits itself, or include a "mythtv-wait" tool that
> knows where to find the necessary configs and waits if needed (you
> can then use this tool in whatever init system you want).


In yavdr 0.3 we used an udev rule and a script remembering the maximum
number of devices. Once the maximum number of devices has been reached
an upstart event has been fired. 

For the other requirements we used
something, which most likely can be solved more elegant with the
wait-for job Clynt has suggested. For next version we have been able to
make vdr udev capable for the devices with a plugin. 

The next challenging part you will face will be the shutdown if
you are working with ubuntu (10.04 -11.04) as base and my assumption is
right, that myth needs a bit more then a few seconds to close
everything. 

Another one will be to wait for the network, if it is configured
requiring network and/or even start if no network is available and
the app is nott requiring it. 








More information about the upstart-devel mailing list