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.
This commit is contained in:
Aaron Andersen
2026-01-19 15:20:43 -05:00
parent 9396cd1d26
commit 39044adcf8
+4
View File
@@ -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);
}
}