[10:19] <mcarter> hello
[10:19] <mcarter> I wrote a couple of event.d/upstart scripts, but when i run "start mycommand" the start command says that "mycommand" succesfully started, but the start command itself never returns. Is this normal? (ubuntu 8.04 LTS)
[10:23] <mgoetze> hm, no, i think start usually returns...
[20:54] <x-warrior> if i want to add something to be executed after bootchart should I create a new file at /etc/init using start on stopped bootchart? 
[21:06] <E0F> hi
[21:07] <E0F> can someone explain me how is determined the events starting order by upstart ? or link me the wiki page which explains it ?
[21:08] <Keybuk> there is no order
[21:09] <E0F> so if I wanted to make a deamon start after another I couldn't ?
[21:10] <Keybuk> of course
[21:10] <Keybuk> you use the events of one daemon to start the other
[21:10] <x-warrior> I think you can use the events, like "start on stopped otherone" 
[21:11] <Keybuk> start on started otherone ;)
[21:12] <Keybuk> you can also do interesting inverse things
[21:12] <Keybuk> for example, let's say you have two services
[21:12] <x-warrior> Keybuk, can i use initctl emit event inside a file.conf 
[21:12] <Keybuk> jack and apple
[21:12] <Keybuk> if you want apple to be started before jack, you have two options
[21:12] <Keybuk> in /etc/init/jack.conf you can put:
[21:12] <Keybuk>   start on started apple
[21:12] <Keybuk> BUT
[21:13] <Keybuk> you can *also* do it the other way, by putting in /etc/init/apple.conf:
[21:13] <Keybuk>   start on starting jack
[21:13] <Keybuk> (don't do both :p)
[21:13] <Keybuk> depends which works better for your model
[21:13] <E0F> that's an interesting system
[21:13] <Keybuk> x-warrior: you can, though remember that you already have four events "for free"
[21:14] <Keybuk> for /etc/init/jack.conf you have
[21:14] <Keybuk>   starting jack
[21:14] <Keybuk>   started jack
[21:14] <Keybuk>   stopping jack
[21:14] <x-warrior> stopped, stoping starting started?
[21:14] <Keybuk>   stopped jack
[21:14] <Keybuk> exactly
[21:14] <Keybuk> you can, of course, use initctl emit to add more ;)
[21:14] <Keybuk> take udev as an example
[21:14] <Keybuk> udevd has rules files, and those can call initctl emit
[21:14] <Keybuk> so we actually end up with
[21:14] <Keybuk>   starting udev
[21:14] <Keybuk>   started udev
[21:14] <Keybuk>   block-device-added
[21:15] <Keybuk>   net-device-added
[21:15] <Keybuk>   :
[21:15] <Keybuk>   net-device-removed
[21:15] <Keybuk>   block-device-removed
[21:15] <Keybuk>   stopping udev
[21:15] <Keybuk>   stopped udev
[21:16] <x-warrior> let's say jack has a "post-stop" if i want to run something after this post-stop is done I need to use initctl emit right? And other doubt, when i need to use exec? :S 
[21:17] <E0F> Keybuk: i'm having a look on my /etc/init.d/cups, for example if I wanted to make it start after atd, what should I put in it and where ? "start on started atd" ? but where ?
[21:17] <x-warrior> E0F,  i think after description usually in the begging of the file
[21:18] <Keybuk> x-warrior: stopped jack is after the post-stop is run
[21:18] <E0F> ok because if I put it in the start() section this would be executed even if I manually start the event
[21:19] <E0F> or eventually reload it
[21:19] <Keybuk> there is no "start" section
[21:19] <Keybuk> E0F: add it to the existing "start on" clause
[21:19] <Keybuk> E0F: though I just realised you said init.d not init ;)
[21:20] <Keybuk> init.d are sysv init scripts
[21:20] <E0F> i'm on fedora 11 ;)
[21:20] <Keybuk> you don't get events for sysv init.d scripts
[21:20] <Keybuk> only for upstart jobs (ie /etc/init/*.conf)
[21:21] <E0F> there is no /etc/init but scripts like http://pastebin.ca/1579530 in /etc/init.d
[21:22] <x-warrior> I think i don't understand the mechanism. If jack executed post-stop so he will be stopped, but if he already doing other things and if "the stop on event" are fired so he will interrupt the execution until the start event is fired again?
[21:22] <Keybuk> I don't understand what you just said
[21:22] <x-warrior> hehe
[21:22] <Keybuk> E0F: that's because Fedora have an out of date version of Upstart
[21:23] <Keybuk> and have not yet switched any of their infrastructure to use it
[21:23] <x-warrior> Lets suppose the jack has start on HELLO and stop on BYE... when the HELLO is fired he will execute the script [ CODE ] end script. 
[21:24] <x-warrior> But if in the middle of the code the BYE event is fired, what happens?
[21:26] <E0F> can you please give me the version number of upstart on your computer ?
[21:26] <x-warrior> E0F, 0.6.3 here 
[21:26] <E0F> yeah ok i've 0.3.11 xD
[21:27] <E0F> think there'll be a newer version of upstart in the next fedora release
[21:34] <Keybuk> x-warrior: the script will get sent SIGTERM
[21:34] <Keybuk> E0F: not that I know of, the Fedora/RH guys are hard at work on the next RHEL release
[21:35] <x-warrior> I must put a stop condition?
[21:37] <Keybuk> no, it's optional
[21:39] <E0F> Keybuk: ok, thank you for the info ^^
[21:40] <x-warrior> I think this is the last question, i read that if any error happens in execution the script will be terminated, how can I debug this? :S 
[22:18] <x-warrior> There is something wrong with this: http://pastebin.ca/1579599 ? I want when bootchart stop I execute a file...