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