It's hard to elaborate, because I don't understand what your proposal does that Upstart doesn't already do.<div><br><div class="gmail_quote">On Tue, May 3, 2011 at 11:07 PM, Clint Byrum <span dir="ltr"><<a href="mailto:clint@ubuntu.com">clint@ubuntu.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Excerpts from Scott James Remnant's message of Tue May 03 17:26:12 -0700 2011:<br>
<div><div></div><div class="h5">> On Sun, May 1, 2011 at 12:17 PM, Clint Byrum <<a href="mailto:clint@ubuntu.com">clint@ubuntu.com</a>> wrote:<br>
><br>
> > > If the backend starts before mysql is available then it will fail, and<br>
> > > upstart does have an opportunity to retry. No harm done then. Not ideal<br>
> > > either, because this attempt will have needlessly slowed the boot<br>
> > > procedure down. So why not put the dependency in the default (and<br>
> > > static) upstart configuration file? Because in the general case the<br>
> > > database need not reside on the same server as the backend (e.g. in the<br>
> > > case of a slave backend).<br>
> ><br>
> > I'm working on a new wait-for-state.conf (which I hope to upload this<br>
> > coming week to Oneiric, and will submit upstream for inclusion) which<br>
> > will make it this easy:<br>
> ><br>
> > if [ -x /usr/sbin/mysqld ] && [ -f /etc/init/mysql.conf ] ; then<br>
> >  start wait-for-state WAIT_FOR=mysql WAIT_STATE=started WAITER=mythtv<br>
> > WAIT_FOREVER=1<br>
> > fi<br>
> ><br>
> ><br>
><br>
> I'm not sure how this is different from a flexible "on" ?<br>
<br>
</div></div>I'm not sure I understand exactly what you mean. An "or" with the two<br>
conditions (video-device-added or started mysql for instance) would<br>
produce a difficult situation where we need to make sure we actually want<br>
to start now, and then we may decide "no mysql isn't ready yet, don't<br>
start" and meanwhile mysql has started and we don't try again because<br>
of the race between checking for mysql and the pre-start changing the<br>
goal back to 'stop'.<br>
<br>
I get the feeling though, that you mean something else. Can you elaborate?<br>
</blockquote></div><br></div>