From 6f3ad111dd2dc18e0d393d59e3a1b383e69d0741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= Date: Sun, 20 May 2012 05:12:52 +0200 Subject: fix /forcefsck logic with initcpio fsck hook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, using "shutdown -F -r now" with fsck initcpio hook doesn't make a full fsck on reboot. Initscripts hook check if /run/initramfs/root-fsck is present to add -M option to fsck which disable check of mounted filesystem. Initcpio doesn't check /forcefsck file and create root-fsck file with a simple fsck check. Signed-off-by: Sébastien Luttringer --- functions | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'functions') diff --git a/functions b/functions index 7516345..b9bfffc 100644 --- a/functions +++ b/functions @@ -494,13 +494,11 @@ 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 + if [[ -f /forcefsck ]] || in_array forcefsck $(< /proc/cmdline); then + FORCEFSCK="-f" + elif [[ -f /fastboot ]] || in_array fastboot $(< /proc/cmdline); then return 0 - fi - - if [[ -e /run/initramfs/root-fsck ]]; then + elif [[ -e /run/initramfs/root-fsck ]]; then IGNORE_MOUNTED="-M" fi -- cgit v1.2.3