mirror of
https://github.com/troglobit/finit.git
synced 2026-10-02 14:02:52 +07:00
Postpone networking stuff, + hooks, a bit to the finalize() step
This patch moves the networking bit to the latter part of bootstrap, called finalize(), in favor of starting the event loop earlier. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
+9
-9
@@ -253,6 +253,15 @@ static void emergency_shell(void)
|
||||
*/
|
||||
static void finalize(void)
|
||||
{
|
||||
/*
|
||||
* Network stuff
|
||||
*/
|
||||
networking();
|
||||
umask(022);
|
||||
|
||||
/* Hooks that rely on loopback, or basic networking being up. */
|
||||
plugin_run_hooks(HOOK_NETWORK_UP);
|
||||
|
||||
/*
|
||||
* Start all tasks/services in the configured runlevel
|
||||
*/
|
||||
@@ -489,15 +498,6 @@ int main(int argc, char* argv[])
|
||||
sm_init(&sm);
|
||||
sm_step(&sm);
|
||||
|
||||
/*
|
||||
* Network stuff
|
||||
*/
|
||||
networking();
|
||||
umask(022);
|
||||
|
||||
/* Hooks that rely on loopback, or basic networking being up. */
|
||||
plugin_run_hooks(HOOK_NETWORK_UP);
|
||||
|
||||
/* Start new initctl API responder */
|
||||
api_init(&loop);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user