From 5b41c6e327c6107baa632abfb9d63f38e26029ce Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sat, 7 Jan 2023 15:09:50 +0100 Subject: [PATCH] HOOK_BASEFS_UP must run as soon as all filesystems are mounted At this hook point the bootmisc.so plugin runs and creates all relevant system directories. Much of the rest of system bootstrap relies on this so it should be called together with the other FS hooks as soon as all the filesystems have been mounted. Signed-off-by: Joachim Wiberg --- src/finit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/finit.c b/src/finit.c index c1399458..b5c87a68 100644 --- a/src/finit.c +++ b/src/finit.c @@ -475,6 +475,9 @@ static void fs_mount_all(void) dbg("Finalize, ensure common file systems are available ..."); fs_finalize(); + + dbg("Base FS up, calling hooks ..."); + plugin_run_hooks(HOOK_BASEFS_UP); } /* @@ -823,9 +826,6 @@ int main(int argc, char *argv[]) /* Base FS up, enable standard SysV init signals */ sig_setup(&loop); - dbg("Base FS up, calling hooks ..."); - plugin_run_hooks(HOOK_BASEFS_UP); - /* * Set up inotify watcher for /etc/finit.conf, /etc/finit.d, and * their deps, to figure out how to bootstrap the system.