On 18 February 2015 at 15:55,  <twuhiokra...@s155519465.onlinehome.us> wrote:
> Unfortunately I like taking things apart to understand how the work ....
>
> I get that the upstart jobs are controlled by events .... so if I have a job
> with:
>
>       start on fred
>

try:

start on fred perry

> and I run at the command line:
>
>       initcrl emit fred
>

with:

initctl emit fred LASTNAME=perry

> the job/task runs.
>
> But now, looking through /etc/init/ I see other jobs with stanzas like:
>
>     start on stopped rc
> or
>     start on runlevel [2345]
>
> How do those extra parameters get passed in the event if "initctl emit" only
> accepts NAME=VALUE pairs as parameters??
>

Well, just like in python one can have "args" and "kwargs"

the "full" event name is "stopped" and the full environment is, e.g.
is always NAME=VALUE pairs:

stopped JOB='upstart-dbus-session-bridge' INSTANCE='' RESULT='ok'

it's just specifying the NAME= is optional, and if absent is positional.

By the way you can monitor the full upstart events with $
upstart-monitor -> that will give you detailed insight into everything
that is going on. Many variables are exported in every event.

-- 
Regards,

Dimitri.

-- 
upstart-devel mailing list
upstart-devel@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel

Reply via email to