initctl: Add dependency on bootmisc

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2016-09-04 17:13:38 +02:00
parent b3fb9ab3ed
commit 74eb2bf4d2
+10 -2
View File
@@ -46,8 +46,8 @@
*/
shutop_t halt = SHUT_DEFAULT;
static void parse(void *arg, int fd, int events);
static void setup(void *arg);
static plugin_t plugin = {
.name = __FILE__,
@@ -55,6 +55,9 @@ static plugin_t plugin = {
.cb = parse,
.flags = PLUGIN_IO_READ,
},
.hook[HOOK_BASEFS_UP] = {
.cb = setup
},
};
static void fifo_open(void)
@@ -173,12 +176,17 @@ static void parse(void *UNUSED(arg), int fd, int UNUSED(events))
fifo_open();
}
PLUGIN_INIT(plugin_init)
/* Must run after the base FS is up, needs /run, or /var/run */
static void setup(void *UNUSED(arg))
{
_d("Setting up %s", FINIT_FIFO);
makefifo(FINIT_FIFO, 0600);
fifo_open();
}
PLUGIN_INIT(plugin_init)
{
plugin_register(&plugin);
}