Blame 0039-95rootfs-block-fix-left-fsck-rel.-checks.patch

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