[09:37] <o_cee> is it possible to to "start on started runlevel 2" in Ubuntu, or does it has to be a job name, "start on started rc2"?
[09:42] <mgoetze> "in ubuntu" is not a very useful description of what upstart version you are using... but anyway, "started" is only for jobs. you want to read the runlevel(7) manpage.
[09:52] <o_cee> mgoetze: sorry, old Ubuntu LTS even with Upstart 0.3.9
[09:53] <o_cee> but yeah, that's what i was thinking as well.. need to make sure the custom jobs are run last, when network is up and so on
[09:54] <mgoetze> o_cee: well the network should already be up when you enter runlevel 2, so "start on runlevel 2" would do for that
[09:55] <o_cee> mgoetze: not sure what exactly was missing the last time i tried, but it borked my live production server :)
[09:55] <o_cee> thought it would be safer to to "on started rc2"
[09:55] <mgoetze> o_cee: if on the other hand you need syslog and all that, you might want to consider "start on stopped rc2"
[09:56] <o_cee> mgoetze: hm yeah, stopped rather than started?
[09:56] <o_cee> "finished" :)
[09:56] <mgoetze> it's "stopped" in upstart 0.6, tbh i'm not sure such an event exists in upstart 0.3
[09:57] <o_cee> "The two primary events generated are now simply called started and stopped"
[09:57] <o_cee> http://www.netsplit.com/2006/12/14/upstart-0-3/
[09:57] <o_cee> guess that should be it?
[09:58] <mgoetze> sure, if that's what the blog says :)
[09:58] <o_cee> but rc2 for example, never goes into "started"? it only finishes and emits "stopped" again?
[09:58] <o_cee> feels a little weird
[09:58] <mgoetze> "started" is not a state, it's an event
[09:59] <mgoetze> "started rc2" is an event that happens very very soon after the event "runlevel 2"
[09:59] <o_cee> oh, i thought that was "starting", and "started" was when it was all finished.. 
[10:00] <mgoetze> oh... yeah you might be right
[10:00] <o_cee> confusing
[10:00] <o_cee> :)
[10:00] <o_cee> "The started event is not emitted until the post-start task (described above) has finished"
[10:01] <mgoetze> the whole sysv-compatibility layer is just annoying :)
[10:01] <o_cee> indeed
[10:01] <o_cee> feels like it will be much easier once it's all ported
[10:01] <o_cee> not a lot of examples now
[10:02] <o_cee> question is if the rc jobs says "stopped" or "started".. hmm
[10:02] <o_cee> because once started, initctl list says "rc2 (stop) waiting"
[10:05] <o_cee> mgoetze: any easy way to find out or test somehow?
[10:08] <mgoetze> initctl events
[10:17] <o_cee> will need something to test this on i think.. instead of on the live server :)
[10:19] <o_cee> oh, whaddaya know.. i actually created jobs for lighttpd locally instead
[10:19] <o_cee> with a fastcgi job that starts after lighttpd
[10:25] <o_cee> ok, seems it does: runlevel 2 -> starting rc2 -> started rc2 -> stopping rc2 ok -> stopped rc2 ok
[10:25] <mgoetze> that sounds logical
[10:26] <o_cee> yup, guess either one will work then, both "started" and "stopped" should be when it's completely done