diff options
author | Sébastien Luttringer <seblu@seblu.net> | 2012-05-20 05:12:52 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2012-05-29 00:51:33 +0200 |
commit | 6f3ad111dd2dc18e0d393d59e3a1b383e69d0741 (patch) | |
tree | 7c808d3e47c444f0ee18b9bfa2ad5719bd92c00f /functions | |
parent | 2915407c58c4c9cc91ae778f9565e45e8466824e (diff) |
fix /forcefsck logic with initcpio fsck hook
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 <seblu@seblu.net>
Diffstat (limited to 'functions')
-rw-r--r-- | functions | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -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 |