ion_ | #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 |
---|---|---|
ion_ | mygl_begin (GL_TRIANGLES) { glVertex3f ... } | 00:53 |
ion_ | Thanks to libnih for inspiration. | 00:53 |
ion_ | +typos | 00:54 |
Arafangion | Howdy guys, I'm using upstart for my (custom) distro, without sysv init. :) | 09:33 |
Arafangion | Just wondering what are the common styles of handling 'shutdown' scripts are. | 09:34 |
Arafangion | 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:35 |
AlexExtreme | I have a 'shutdown' job which does the proper shutdown (unmount filesystems, reboot/shutdown), which is started on the shutdown event | 09:36 |
AlexExtreme | then, put this in the jobs you want to stop at shutdown: "stop on starting shutdown" | 09:36 |
Arafangion | AlexExtreme: I'd rather not have to do the tasks sequentially. :( | 09:37 |
AlexExtreme | you don't have to | 09:37 |
AlexExtreme | http://ftp.frugalware.org/pub/other/upstart-jobs/upstart-jobs/jobs.d/shutdown | 09:38 |
Arafangion | 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 |
Arafangion | Hmm. | 09:38 |
Arafangion | Ahh, I'm not using runlevels. | 09:38 |
AlexExtreme | the runlevels in that script are only used to determine whether to shutdown or reboot | 09:38 |
Arafangion | But I'll model something on that. | 09:39 |
Arafangion | Yeah, looks fairly generic, now that I actually read it. | 09:39 |
AlexExtreme | all the jobs that need to stop at shutdown have "stop on starting shutdown" | 09:39 |
Arafangion | What's all the "killall5" commands? | 09:39 |
Arafangion | Not familiar with that. | 09:39 |
Arafangion | In what way is it different to 'killall'? | 09:39 |
AlexExtreme | not exactly sure, it's provided by sysvinit, I just used it because the scripts I ported used it | 09:40 |
Arafangion | I don't have sysvinit. :) Anyway, thanks for that script, I'll do something very similar. | 09:41 |
Arafangion | What would be very nice, though, would be to have an ability to do something like: | 09:42 |
Arafangion | start on no-jobs-starting-after shutdown | 09:43 |
Arafangion | Where that job will start after everything else that has started in response to shutdown has finished. | 09:43 |
Arafangion | And one can then just add small scripts for particular services, such as databases, etc, which might take more than 2 seconds to finish. | 09:44 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!