summary refs log tree commit diff
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2014-08-11 08:45:55 +0200
committerJuan RP <xtraeme@gmail.com>2014-08-11 08:45:55 +0200
commit644d9b1f0b4cc03cb547e04ec5c87fd1345ab3e5 (patch)
treebe2a979ca9c2d421cb1400fc221a0e3081d3c906
parente677fb2fa81d096088cc0f317028086dddb1a16a (diff)
downloadrunit-void-644d9b1f0b4cc03cb547e04ec5c87fd1345ab3e5.tar.gz
runit-void-644d9b1f0b4cc03cb547e04ec5c87fd1345ab3e5.tar.xz
runit-void-644d9b1f0b4cc03cb547e04ec5c87fd1345ab3e5.zip
Added support for fastboot and forcefsck based on ignite.
-rw-r--r--core-services/03-filesystems.sh19
1 files changed, 15 insertions, 4 deletions
diff --git a/core-services/03-filesystems.sh b/core-services/03-filesystems.sh
index d30c0e5..8256e7d 100644
--- a/core-services/03-filesystems.sh
+++ b/core-services/03-filesystems.sh
@@ -32,10 +32,21 @@ if [ -e /etc/crypttab ]; then
     fi
 fi
 
-msg "Checking filesystems:\n"
-fsck -A -T -a -t noopts=_netdev
-if [ $? -gt 1 ]; then
-    emergency_shell
+[ -f /fastboot ] && FASTBOOT=1
+[ -f /forcefsck ] && FORCEFSCK="-f"
+for arg in $(cat /proc/cmdline); do
+    case $arg in
+        fastboot) FASTBOOT=1;;
+        forcefsck) FORCEFSCK="-f";;
+    esac
+done
+
+if [ -z "$FASTBOOT" ]; then
+    msg "Checking filesystems:\n"
+    fsck -A -T -a -t noopts=_netdev $FORCEFSCK
+    if [ $? -gt 1 ]; then
+        emergency_shell
+    fi
 fi
 
 msg "Mounting rootfs read-write...\n"