From 39044adcf881baf3cfcebcab551e908c837ccb94 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Sun, 18 Jan 2026 19:11:24 -0500 Subject: [PATCH] Create mount points in fs_init() if they don't exist In containerized or virtualized environments, standard mount point directories may not exist at boot. Ensure they are created before attempting to mount. --- src/finit.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/finit.c b/src/finit.c index 04b2c155..9dcb17db 100644 --- a/src/finit.c +++ b/src/finit.c @@ -523,6 +523,10 @@ static void fs_init(void) if (fismnt(fs[i].file)) continue; + /* Create mount point if it doesn't exist */ + if (mkdir(fs[i].file, 0755) && errno != EEXIST) + warn("Failed creating mountpoint %s: %s", fs[i].file, strerror(errno)); + fs_mount(fs[i].spec, fs[i].file, fs[i].type, 0, NULL); } }