[01:41] <catsup> um
[01:41] <catsup> function nesting is totally different from closures
[01:42] <catsup> in fact the difference between them is exactly what is meant by the word 'closure'
[01:44] <ion_> He said "gets you mostly there", not "they're equivalent".
[07:58] <rgl> hi
[14:31] <TimothyP> Hello, I'm using Ubuntu and I need to start something (an upstart job) AFTER MySQL has started. Someone told me Ubuntu/Upstart only goes to runlevel 2 , can someone verify / explain this? and perhaps tell me how to execute a job AFTER mysql has started?
[14:35] <sadmac2> TimothyP: start on started mysql
[14:36] <TimothyP> oh that works already?
[14:36] <TimothyP> I thought it was to be implemented :d
[14:36] <sadmac2> TimothyP: well...upstart does it. how ubuntu has upstart set up (i.e. whether mysql is an upstart job) I don't know.
[14:37] <TimothyP> cool, and how does it know mysql is mysql server, does it use the name in /etc/init.d/  or something else (I need to know the details as I need to explain this to others tonight :p)
[14:37] <TimothyP> I see
[14:37] <TimothyP> ok I'll try thnx :d
[14:37] <sadmac2> the name of the file in /etc/init.d
[14:38]  * TimothyP is rebooting the vm now to see what happens :d
[14:41] <TimothyP> nope didn't do anything doh ! :p
[14:41] <sadmac2> hmm. so mysql isn't getting started, isn't called mysql, or isn't started by upstart directly
[14:42] <thom> the latter 
[14:43] <sadmac2> well then that's an issue
[14:55] <TimothyP> is there a way to list ALL events that are emitted during startup?
[14:56] <sadmac2> TimothyP: if you could get `initctl events` running early enough that could do it
[14:57] <TimothyP> hmm perhaps adding a job   on runlevel 2 which starts that and logs to a file
[14:57] <TimothyP> I'll try
[15:17] <TimothyP>  if I have on started mysql    for a job  and I /etc/init.d/mysql restart , should that job be executed then?
[15:18] <sadmac2> TimothyP: ....that makes no sense
[15:18] <sadmac2> /etc/init.d/mysql shouldn't be runnable
[15:18] <sadmac2> oh wait
[15:18] <sadmac2> I'm thinking of event.d
[15:18]  * sadmac2 facepalm
[15:19] <sadmac2> TimothyP: anything in /etc/init.d isn't being managed by upstart
[15:19] <sadmac2> so  you can't react to it
[15:19] <TimothyP> damn this is very very confusing all the examples come in the form of on started mysql
[15:19] <TimothyP> :p
[15:20] <TimothyP> they should have removed the old system all together and 100% upstart instead of all this mixing :d
[15:20] <sadmac2> TimothyP: if mysql is being started by something in init.d then you can't react to it.
[15:20] <sadmac2> TimothyP: fedora 9's implementation actually pushes events into upstart from /etc/rc, so it would still work
[15:21] <TimothyP> in that case that's a bug in ubuntu , if they want to use upstart and keep the old system they should at least link them :)
[15:25] <TimothyP> what about emiting something custom myself? I could add that to /etc/init.d/mysql then ? is it possible like initctl emit blabla
[15:26] <sadmac2> TimothyP: yes
[15:26] <sadmac2> TimothyP: initctl emit started mysql even
[15:26] <TimothyP> aha and then I'd on blabla
[15:26] <TimothyP> oh
[15:26] <TimothyP> and everything ager  emit is a string which should be used then in the on statement?
[15:26] <sadmac2> yep
[15:27] <TimothyP> bingo
[15:27] <TimothyP> that solves everything
[15:27] <TimothyP> thank you
[15:27] <sadmac2> np
[16:57] <rgl> is fedora using upstart by default?
[17:04] <AlexExtreme> yes, in fedora 9 it is
[22:45] <sadmac> Keybcz: why the strange name?
[22:45] <Keybcz> because I'm in Prague
[22:49] <sadmac> aah.
[22:50] <sadmac> Keybcz: I've been playing with refactoring a couple functions in upstart
[22:50] <sadmac> just for teh lulz
[22:54] <Keybcz> oh, which ones?
[22:56] <Keybcz> got a bzr archive I can pull from?
[23:22] <sadmac> Keybcz: event_pending_handle_jobs. Its broke right now though, so it'll be a minute :)
[23:24] <Keybcz> oh
[23:24] <Keybcz> wonderful
[23:24] <Keybcz> that's the function from hell
[23:25] <Keybcz> I have about four instances of copy and paste code in the d-bus calls for that
[23:25] <Keybcz> GetInstance shares some of the code
[23:25] <Keybcz> Start, Stop and Restart share much of the code
[23:25] <Keybcz> etc.
[23:26] <Keybcz> I figured that there should be something that gets an instance from a job class
[23:26] <Keybcz> and then start and stop functions
[23:26] <Keybcz> but they still end up sharing the code that builds the environment to get an instance
[23:26] <Keybcz> so it's a bit messy really
[23:27] <sadmac> well, I was more doing it for my own understanding, so there might be a better way..
[23:27] <Keybcz> *nods*