]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
95rootfs-block: skip checks rel. to fsck if rd.skipfsck is supplied
authorAmadeusz Żołnowski <aidecoe@aidecoe.name>
Fri, 29 Jun 2012 11:58:21 +0000 (13:58 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 2 Jul 2012 16:52:49 +0000 (18:52 +0200)
modules.d/95rootfs-block/mount-root.sh

index 910963866ba905298b87e8fbe13d621967f4d0f9..19f59facbe1538321d25c616d89444a2f058f78c 100755 (executable)
@@ -54,20 +54,23 @@ mount_root() {
         fsckoptions=$(cat "$NEWROOT"/fsckoptions)
     fi
 
-    if [ -f "$NEWROOT"/forcefsck ] || getargbool 0 forcefsck ; then
-        fsckoptions="-f $fsckoptions"
-    elif [ -f "$NEWROOT"/.autofsck ]; then
-        [ -f "$NEWROOT"/etc/sysconfig/autofsck ] && . "$NEWROOT"/etc/sysconfig/autofsck
-        if [ "$AUTOFSCK_DEF_CHECK" = "yes" ]; then
-            AUTOFSCK_OPT="$AUTOFSCK_OPT -f"
-        fi
-        if [ -n "$AUTOFSCK_SINGLEUSER" ]; then
-            warn "*** Warning -- the system did not shut down cleanly. "
-            warn "*** Dropping you to a shell; the system will continue"
-            warn "*** when you leave the shell."
-            emergency_shell
+    if ! getargbool 0 rd.skipfsck; then
+        if [ -f "$NEWROOT"/forcefsck ] || getargbool 0 forcefsck ; then
+            fsckoptions="-f $fsckoptions"
+        elif [ -f "$NEWROOT"/.autofsck ]; then
+            [ -f "$NEWROOT"/etc/sysconfig/autofsck ] && \
+                . "$NEWROOT"/etc/sysconfig/autofsck
+            if [ "$AUTOFSCK_DEF_CHECK" = "yes" ]; then
+                AUTOFSCK_OPT="$AUTOFSCK_OPT -f"
+            fi
+            if [ -n "$AUTOFSCK_SINGLEUSER" ]; then
+                warn "*** Warning -- the system did not shut down cleanly. "
+                warn "*** Dropping you to a shell; the system will continue"
+                warn "*** when you leave the shell."
+                emergency_shell
+            fi
+            fsckoptions="$AUTOFSCK_OPT $fsckoptions"
         fi
-        fsckoptions="$AUTOFSCK_OPT $fsckoptions"
     fi
 
     rootopts=