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 <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2018-01-15 15:23:25 +01:00
parent d35a8bbda9
commit b60d8ce4b6
+5 -5
View File
@@ -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!