summaryrefslogtreecommitdiffstats
path: root/source/a/sysvinit-scripts/scripts/rc.S
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/sysvinit-scripts/scripts/rc.S')
-rw-r--r--source/a/sysvinit-scripts/scripts/rc.S9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/a/sysvinit-scripts/scripts/rc.S b/source/a/sysvinit-scripts/scripts/rc.S
index e689e4589..a382bd556 100644
--- a/source/a/sysvinit-scripts/scripts/rc.S
+++ b/source/a/sysvinit-scripts/scripts/rc.S
@@ -229,8 +229,13 @@ if [ -r /etc/forcefsck ]; then
FORCEFSCK="-f"
fi
-# Check the root filesystem:
-if [ ! $READWRITE = yes ]; then
+# If we're using F2FS for the root filesystem, don't check it as it doesn't
+# allow checking a read-only filesystem:
+if [ "$(cat /etc/fstab | tr '\t' ' ' | tr -s ' ' | grep ' / ' | cut -f 3 -d ' ')" = "f2fs" ]; then
+ echo "Remounting root device with read-write enabled."
+ /sbin/mount -w -v -n -o remount /
+elif [ ! $READWRITE = yes ]; then
+ # Check the root filesystem:
RETVAL=0
if [ ! -r /etc/fastboot ]; then
echo "Checking root filesystem:"