conditonal events to start a script?
Michael Biebl
mbiebl at gmail.com
Mon Oct 30 21:09:27 GMT 2006
2006/10/30, paul <phsdv at tiscali.fr>:
>
> The IFEXISTS keyword tells the script to only wait for a xfs/stop event if
> xfs is known to upstart. Maybe the most simple way to do this is to check
> if there is a script in /etc/event.d with the name xfs. Of course the xfs
> script should only be installed in /etc/event.d when the xfs package is
> installed.
I agree, that something like this is useful. The problem is, a
deterministic, dependency based init system does not map one to one to
an event based init system.
Even if you have xfs in /etc/event.d/, you can't tell for sure if (and
when) the start event for xfs is generated and xfs is ever started.
So what do you do in such a case: wait and then timeout?
This issue has been discussed already but afaicr no good solution was found yet.
>
> Other examples are:
> - nfs should wait for quota if it exists
> - gkrellmd should wait for lm_sensors if it exists
> - hald should wait for dns if it exists.
>
> Does this make sense, or is there an other simpler way of doing this?
>
> Paul
>
> PS for Gentoo-ers, this is know as 'after'
Not quite correct, the corresponding functionality in Gentoo's init is
called "use", which describes a conditional dependency (in contrary to
"need", which is an absolute dep). "before" and "after" are mere
ordering statements [1].
Cheers,
Michael
[1]http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4#doc_chap4
More information about the Upstart-devel
mailing list