[00:53] #define mygl_begin(mode) { for (int _mybl_begin_i = 0; _mybl_begin_i < 3; ++_mybl_begin_i) if (_mybl_begin_i == 0) glBegin (mode); else if (_mybl_begin_i == 2) glEnd (); else [00:53] mygl_begin (GL_TRIANGLES) { glVertex3f ... } [00:53] Thanks to libnih for inspiration. [00:54] +typos [09:33] Howdy guys, I'm using upstart for my (custom) distro, without sysv init. :) [09:34] Just wondering what are the common styles of handling 'shutdown' scripts are. [09:35] For now, I've just got an 'onshutdown' job that is fired when recieving the 'shutdown' event, which contains a script that calls initctl a dozen times to stop a dozen other jobs that were started, but there has to be a better way. [09:36] I have a 'shutdown' job which does the proper shutdown (unmount filesystems, reboot/shutdown), which is started on the shutdown event [09:36] then, put this in the jobs you want to stop at shutdown: "stop on starting shutdown" [09:37] AlexExtreme: I'd rather not have to do the tasks sequentially. :( [09:37] you don't have to [09:38] http://ftp.frugalware.org/pub/other/upstart-jobs/upstart-jobs/jobs.d/shutdown [09:38] Seems that if I want concurrent, I really need a dozen jobs, all which listen to the shutdown event, and a final 'halt' script that is run after all of those are stopped. [09:38] Hmm. [09:38] Ahh, I'm not using runlevels. [09:38] the runlevels in that script are only used to determine whether to shutdown or reboot [09:39] But I'll model something on that. [09:39] Yeah, looks fairly generic, now that I actually read it. [09:39] all the jobs that need to stop at shutdown have "stop on starting shutdown" [09:39] What's all the "killall5" commands? [09:39] Not familiar with that. [09:39] In what way is it different to 'killall'? [09:40] not exactly sure, it's provided by sysvinit, I just used it because the scripts I ported used it [09:41] I don't have sysvinit. :) Anyway, thanks for that script, I'll do something very similar. [09:42] What would be very nice, though, would be to have an ability to do something like: [09:43] start on no-jobs-starting-after shutdown [09:43] Where that job will start after everything else that has started in response to shutdown has finished. [09:44] And one can then just add small scripts for particular services, such as databases, etc, which might take more than 2 seconds to finish.