From 28ec5b76ca5cbb53ec9d5de73749dbe76db7611a Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Sat, 17 Mar 2012 11:12:55 +0100 Subject: fsck: move FORCEFSCK/FASTBOOT logic to fsck_all Avoid global variables, and make things clearer. Signed-off-by: Tom Gundersen --- functions | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'functions') diff --git a/functions b/functions index 0b7fd8d..747e42d 100644 --- a/functions +++ b/functions @@ -428,6 +428,12 @@ NETFS="nfs,nfs4,smbfs,cifs,codafs,ncpfs,shfs,fuse,fuseblk,glusterfs,davfs,fuse.g # Check local filesystems fsck_all() { + [[ -f /forcefsck ]] || in_array forcefsck $(< /proc/cmdline) && FORCEFSCK="-f" + + if [[ ! -n $FORCEFSCK ]] && { [[ -f /fastboot ]] || in_array fastboot $(< /proc/cmdline); }; then + return + fi + if [[ -e /run/initramfs/root-fsck ]]; then IGNORE_MOUNTED="-M" fi -- cgit v1.2.3