From b60d8ce4b60351a4ee3d06bc26fbe53eb49c1786 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Mon, 15 Jan 2018 15:23:25 +0100 Subject: [PATCH] Fix bootstrap ordering problem, inotify watchers *after* HOOK_BASEFS_UP An external plugin to set up /etc can use HOOK_BASEFS_UP, but the Finit conf_monitor() must then be called *after* not before that hook, or the inotify watchers will listen on the wrong inode. Signed-off-by: Joachim Nilsson --- src/finit.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/finit.c b/src/finit.c index 7397fd90..90162a26 100644 --- a/src/finit.c +++ b/src/finit.c @@ -455,17 +455,17 @@ int main(int argc, char* argv[]) /* Base FS up, enable standard SysV init signals */ sig_setup(&loop); + if (!rescue) { + _d("Base FS up, calling hooks ..."); + plugin_run_hooks(HOOK_BASEFS_UP); + } + /* * Set up inotify watcher for /etc/finit.d and read all .conf * files to figure out how to bootstrap the system. */ conf_monitor(&loop); - if (!rescue) { - _d("Base FS up, calling hooks ..."); - plugin_run_hooks(HOOK_BASEFS_UP); - } - /* * Initalize state machine and start all bootstrap tasks * NOTE: no network available!