/srv/irclogs.ubuntu.com/2009/09/25/#upstart.txt

=== robbiew1 is now known as robbiew
=== robbiew1 is now known as robbiew
=== robbiew1 is now known as robbiew
=== robbiew1 is now known as robbiew
mcarterhello10:19
mcarterI 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:19
mgoetzehm, no, i think start usually returns...10:23
x-warriorif i want to add something to be executed after bootchart should I create a new file at /etc/init using start on stopped bootchart? 20:54
E0Fhi21:06
E0Fcan someone explain me how is determined the events starting order by upstart ? or link me the wiki page which explains it ?21:07
Keybukthere is no order21:08
E0Fso if I wanted to make a deamon start after another I couldn't ?21:09
Keybukof course21:10
Keybukyou use the events of one daemon to start the other21:10
x-warriorI think you can use the events, like "start on stopped otherone" 21:10
Keybukstart on started otherone ;)21:11
Keybukyou can also do interesting inverse things21:12
Keybukfor example, let's say you have two services21:12
x-warriorKeybuk, can i use initctl emit event inside a file.conf 21:12
Keybukjack and apple21:12
Keybukif you want apple to be started before jack, you have two options21:12
Keybukin /etc/init/jack.conf you can put:21:12
Keybuk  start on started apple21:12
KeybukBUT21:12
Keybukyou can *also* do it the other way, by putting in /etc/init/apple.conf:21:13
Keybuk  start on starting jack21:13
Keybuk(don't do both :p)21:13
Keybukdepends which works better for your model21:13
E0Fthat's an interesting system21:13
Keybukx-warrior: you can, though remember that you already have four events "for free"21:13
Keybukfor /etc/init/jack.conf you have21:14
Keybuk  starting jack21:14
Keybuk  started jack21:14
Keybuk  stopping jack21:14
x-warriorstopped, stoping starting started?21:14
Keybuk  stopped jack21:14
Keybukexactly21:14
Keybukyou can, of course, use initctl emit to add more ;)21:14
Keybuktake udev as an example21:14
Keybukudevd has rules files, and those can call initctl emit21:14
Keybukso we actually end up with21:14
Keybuk  starting udev21:14
Keybuk  started udev21:14
Keybuk  block-device-added21:14
Keybuk  net-device-added21:15
Keybuk  :21:15
Keybuk  net-device-removed21:15
Keybuk  block-device-removed21:15
Keybuk  stopping udev21:15
Keybuk  stopped udev21:15
x-warriorlet'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:16
E0FKeybuk: 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-warriorE0F,  i think after description usually in the begging of the file21:17
Keybukx-warrior: stopped jack is after the post-stop is run21:18
E0Fok because if I put it in the start() section this would be executed even if I manually start the event21:18
E0For eventually reload it21:19
Keybukthere is no "start" section21:19
KeybukE0F: add it to the existing "start on" clause21:19
KeybukE0F: though I just realised you said init.d not init ;)21:19
Keybukinit.d are sysv init scripts21:20
E0Fi'm on fedora 11 ;)21:20
Keybukyou don't get events for sysv init.d scripts21:20
Keybukonly for upstart jobs (ie /etc/init/*.conf)21:20
E0Fthere is no /etc/init but scripts like http://pastebin.ca/1579530 in /etc/init.d21:21
x-warriorI 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
KeybukI don't understand what you just said21:22
x-warriorhehe21:22
KeybukE0F: that's because Fedora have an out of date version of Upstart21:22
Keybukand have not yet switched any of their infrastructure to use it21:23
x-warriorLets 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:23
x-warriorBut if in the middle of the code the BYE event is fired, what happens?21:24
E0Fcan you please give me the version number of upstart on your computer ?21:26
x-warriorE0F, 0.6.3 here 21:26
E0Fyeah ok i've 0.3.11 xD21:26
E0Fthink there'll be a newer version of upstart in the next fedora release21:27
Keybukx-warrior: the script will get sent SIGTERM21:34
KeybukE0F: not that I know of, the Fedora/RH guys are hard at work on the next RHEL release21:34
x-warriorI must put a stop condition?21:35
Keybukno, it's optional21:37
E0FKeybuk: ok, thank you for the info ^^21:39
x-warriorI 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 21:40
x-warriorThere is something wrong with this: http://pastebin.ca/1579599 ? I want when bootchart stop I execute a file... 22:18

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!