mirror of
https://github.com/troglobit/finit.git
synced 2026-10-23 11:44:37 +00:00
Improve runlevel support by adding a bootstrap phase, also adds task/run cmd
Most systems need an early bootstrap phase for one-shot tasks and necessary one-time probing. This phase usually runs well before any networking is setup. This commit adds support for that 'S' runlevel, and also extends the number of possible total runlevels to nine. For the one-shot tasks that run in bootstrap two new finit.conf cmds have been added: - task: For one-shot tasks that can be started in parallell - run: For one-shot tasks that must run in sequence Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
e776838de9
commit
25cc9f3b9b
9 files changed
+163
-85
No files matched your search
+4
-1
@@ -91,10 +91,13 @@ static void parse(void *UNUSED(arg), int fd, int UNUSED(events))
|
||||
|
||||
case 's':
|
||||
case 'S':
|
||||
_d("Cannot enter bootstrap after boot ...");
|
||||
rq.runlevel = '1';
|
||||
/* Fall through to regular processing */
|
||||
|
||||
case '1'...'5':
|
||||
_d("Setting new runlevel %c ...", rq.runlevel);
|
||||
case '7'...'9':
|
||||
_d("Setting new runlevel %c", rq.runlevel);
|
||||
svc_runlevel(rq.runlevel - '0');
|
||||
break;
|
||||
|
||||
|
||||
Reference in new issue
Block a user