From af3b67b21308a7b91bb423ae93af54a6a3e41afd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
Date: Thu, 26 Jul 2012 15:05:21 +0200
Subject: [PATCH] 95rootfs-block: fix left fsck rel. checks
---
modules.d/95rootfs-block/mount-root.sh | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/modules.d/95rootfs-block/mount-root.sh b/modules.d/95rootfs-block/mount-root.sh
index 670f6e3..ef8ca3c 100755
--- a/modules.d/95rootfs-block/mount-root.sh
+++ b/modules.d/95rootfs-block/mount-root.sh
@@ -52,11 +52,11 @@ mount_root() {
fastboot=yes
fi
- if [ -f "$NEWROOT"/fsckoptions ]; then
- fsckoptions=$(cat "$NEWROOT"/fsckoptions)
- fi
-
if ! getargbool 0 rd.skipfsck; then
+ if [ -f "$NEWROOT"/fsckoptions ]; then
+ fsckoptions=$(cat "$NEWROOT"/fsckoptions)
+ fi
+
if [ -f "$NEWROOT"/forcefsck ] || getargbool 0 forcefsck ; then
fsckoptions="-f $fsckoptions"
elif [ -f "$NEWROOT"/.autofsck ]; then
@@ -130,8 +130,10 @@ mount_root() {
mount -o remount "$NEWROOT" 2>&1 | vinfo
fi
- [ -f "$NEWROOT"/forcefsck ] && rm -f "$NEWROOT"/forcefsck 2>/dev/null
- [ -f "$NEWROOT"/.autofsck ] && rm -f "$NEWROOT"/.autofsck 2>/dev/null
+ if ! getargbool 0 rd.skipfsck; then
+ [ -f "$NEWROOT"/forcefsck ] && rm -f "$NEWROOT"/forcefsck 2>/dev/null
+ [ -f "$NEWROOT"/.autofsck ] && rm -f "$NEWROOT"/.autofsck 2>/dev/null
+ fi
}
if [ -n "$root" -a -z "${root%%block:*}" ]; then