summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorSébastien Luttringer <seblu@seblu.net>2012-05-20 05:12:52 +0200
committerTom Gundersen <teg@jklm.no>2012-05-29 00:51:33 +0200
commit6f3ad111dd2dc18e0d393d59e3a1b383e69d0741 (patch)
tree7c808d3e47c444f0ee18b9bfa2ad5719bd92c00f /functions
parent2915407c58c4c9cc91ae778f9565e45e8466824e (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--functions10
1 files changed, 4 insertions, 6 deletions
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