mirror of
https://github.com/troglobit/finit.git
synced 2026-10-17 10:49:34 +00:00
Refactor initial startup, run runparts and rc.local in background
The code refactored in this commit has long been an eyesore. The
hand-over, from the sequential main() function, to the event loop
was clumsy at best and was very difficult to debug.
Instead of using a series of workers we now delegate everything to
the big state machine by introducing a new SM_BOOTSRTAP_WAIT_STATE.
Both the runparts and rc.local scripts now run in the background, no
longer blocking the event loop from responding to initctl calls. To
ensure they run at the same point in time two things have been done:
1. A new <int/bootstrap> condition has been added which triggers
runparts, which now is a regular task created by conf_init()
2. /etc/rc.local is started from SM_RUNLEVEL_WAIT_STATE when we
transition from runlevel S to any other runlevel.
Fixes #356
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
28e101aaae
commit
a58002588e
13 files changed
+372
-235
No files matched your search
+1
-1
@@ -243,7 +243,7 @@ static void devmon_cb(uev_t *w, void *arg, int events)
|
||||
}
|
||||
}
|
||||
|
||||
void devmon_init(void)
|
||||
void devmon_init(uev_ctx_t *ctx)
|
||||
{
|
||||
char dir[MAX_ARG_LEN];
|
||||
|
||||
|
||||
Reference in new issue
Block a user