Fix #40, #39: initctl plugin started too early, before /run FS existed

Delay setup of initctl plugin to after the base filesystems are up and
after the bootmisc plugin has run.

This patch factors out the I/O initialization of plugins so it does not
have to run when plugins are loaded.  Instead, plugins can now call this
API to register an I/O callback when they are ready.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2016-09-08 12:58:28 +02:00
1 parent 3023433def
commit 19b81cf434
3 files changed
+29 -20

No files matched your search

+2
View File
@@ -58,6 +58,7 @@ static plugin_t plugin = {
.hook[HOOK_BASEFS_UP] = {
.cb = setup
},
.depends = { "bootmisc", },
};
static void fifo_open(void)
@@ -183,6 +184,7 @@ static void setup(void *UNUSED(arg))
makefifo(FINIT_FIFO, 0600);
fifo_open();
plugin_io_init(&plugin);
}
PLUGIN_INIT(plugin_init)