From 26409bc8607d0f7b10abdd400acd808115aae39e Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Tue, 26 Apr 2022 21:59:11 +0200 Subject: [PATCH] Follow-up to 57c97d8, issue #224: fsck needs FSTAB_FILE env. set Signed-off-by: Joachim Wiberg --- src/finit.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/finit.c b/src/finit.c index d49a5135..bd7fc88a 100644 --- a/src/finit.c +++ b/src/finit.c @@ -338,6 +338,14 @@ static void fs_mount_all(void) sulogin(1); } + /* + * Needed by fsck, both BusyBox and util-linux support this. + * We leave it set in the env. for the benefit of any mount + * helpers and other system tools that the user expects to + * behave even if we've booted with a different fstab. + */ + setenv("FSTAB_FILE", fstab, 1); + if (!rescue) fs_remount_root(fsck_all());