conditonal events to start a script?

paul phsdv at tiscali.fr
Tue Oct 31 19:36:04 GMT 2006


Sean Russell wrote:
> On Monday 30 October 2006 14:29, paul wrote:
>> In trying to think of events to boot my systems with upstart I
>> stumbled over the following problem. On one machine I have the
>
> You may want to look back through the mailing list archives; there's
> been an ongoing discussion about multiple event requirements and
> conditional events.
Yes, I found it. It seams you have already discussed this issue
in great length. I should have looked in the archives first. My bad.
So I spend most of last night reading all posts in he archive ;-)

Thinking about the conditional events I come to the same point as
you where on Oct 13th. Maybe upstart needs something like this:

start on filesystem.writable & xfs.started & (hald.started | hald.failed)

or

start on filesystem.writable & xfs.started & hald.[started|failed]

This will start on filesystem.writable event and if xfs is installed
it waits (non conditional) on xfs to be started, but not when it is
not installed (because it gets dropped). And it waits for either
the started or failed event from the hald script.

I do not think you really need a timeout here (although it might
be elegant to have it anyway). When you never get the hald.started or 
hald.failed event,
then most likely hald was never started. Which means that something else
is seriously wrong. Do you still want to continue in that case?

Paul





More information about the Upstart-devel mailing list