---
 modules.d/95rootfs-block/mount-root.sh |   14 ++++++++------
 1 files 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
-- 
1.7.8.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to