Skip to content

Commit

Permalink
Follow-up to 57c97d8, issue #224: fsck needs FSTAB_FILE env. set
Browse files Browse the repository at this point in the history
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
  • Loading branch information
troglobit committed Apr 26, 2022
1 parent b01f9f3 commit 26409bc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/finit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down

0 comments on commit 26409bc

Please sign in to comment.