This shouldn't be the case unless you also put "export SYSLOG" in the jobs that use "start on started..." - environment isn't copied from the start event into the new start event<br><br><div class="gmail_quote">
On Tue, Jun 7, 2011 at 10:17 AM, Jacek Konieczny <span dir="ltr"><<a href="mailto:jajcus@jajcus.net">jajcus@jajcus.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Tue, Jun 07, 2011 at 03:00:03PM +0100, James Hunt wrote:<br>
> ==== Option 1 ====<br>
><br>
> Update every package that provides a service such that its Job<br>
> Configuration File sets and exports a "well-known" variable. The<br>
> proposed list of environment variables which represent these services<br>
> is:<br>
><br>
>   DISPLAY_MANAGER<br>
>   FIREWALL<br>
>   GRAPHICS_CARD<br>
>   NETWORK<br>
>   NETWORK_MANAGER<br>
><br>
> For example, each display manager package would be updated such that its<br>
> .conf file specified:<br>
><br>
>   env    DISPLAY_MANAGER=y<br>
>   export DISPLAY_MANAGER<br>
><br>
> Then, any job that requires a display manager could say:<br>
><br>
>   start on starting DISPLAY_MANAGER=y<br>
<br>
</div>I have tried a similar approach in PLD Linux. We allow multiple syslog<br>
implementations there, so I made syslog-ng do:<br>
<br>
env SERVICE=syslog<br>
export SERVICE=syslog<br>
<br>
and in dependant jobs:<br>
<br>
start on started SERVICE=syslog<br>
<br>
That seemed to work well… but it didn't quite behave as expected. The<br>
problem was every service started via 'start on started SERVICE=syslog'<br>
inherited the 'SERVICE=syslog' variable and would trigger other jobs<br>
start (that was not visible at first, as those jobs would be usually<br>
already running because of the first event with SERVICE=syslog).<br>
<br>
I am not sure this is expected behaviour of Upstart or if it can be<br>
changed, but Option 1 clearly didn't work for me. Though, I would prefer<br>
this way over 'Option 2'.<br>
<br>
'Option 2' (abstract job explicitely listing real jobs that trigger it)<br>
may be good for a well-defined 'contained' distribution like Ubuntu, but<br>
not a 'everybody may add his stuff' distribution like PLD Linux… or<br>
Ubuntu with all the unofficial package repositories. Auto-generating the<br>
job definitions would help, of course… but weren't the Upstart job files<br>
intended to be human readable and human writable?  If we start a<br>
precedence of machine generated job descriptions we may end with another<br>
layer of machinery over Upstart…<br>
<br>
Greets,<br>
<font color="#888888">        Jacek<br>
</font><div><div></div><div class="h5"><br>
--<br>
upstart-devel mailing list<br>
<a href="mailto:upstart-devel@lists.ubuntu.com">upstart-devel@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/upstart-devel" target="_blank">https://lists.ubuntu.com/mailman/listinfo/upstart-devel</a><br>
</div></div></blockquote></div><br>