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.
@@ -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);
