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.
@@ -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!
