Perform fsck on each booting 37/176337/1 accepted/tizen/unified/20180419.075955 submit/tizen/20180418.115925
authorHyotaek Shim <hyotaek.shim@samsung.com>
Wed, 18 Apr 2018 11:57:19 +0000 (20:57 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Wed, 18 Apr 2018 11:57:19 +0000 (20:57 +0900)
Change-Id: I063c8bbf2f9ca0b0c995a1dd8260bfab7efe41f6
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
scripts/init.sh

index 4a8f064..60aa787 100755 (executable)
@@ -30,6 +30,7 @@ fi
 FIRSTBOOT=1
 if [ x"$DATAFS" != "x" ]
 then
+    /sbin/fsck -y $DATAFS
     /bin/mount $DATAFS /opt
 
     if [ -e /opt/var/.fsck_done ]
@@ -46,8 +47,8 @@ then
     if [ "$FIRSTBOOT" = "1" ]
     then
         /sbin/resize2fs -f $ROOTFS
-        /sbin/fsck -y $ROOTFS
     fi
+    /sbin/fsck -y $ROOTFS
     /bin/mount $ROOTFS /sysroot -o rw
 else
     echo "WARNING : THERE IS NO ROOTFS."
@@ -59,7 +60,6 @@ then
     if [ "$FIRSTBOOT" = "1" ]
     then
         /sbin/resize2fs -f $DATAFS
-        /sbin/fsck -y $DATAFS
         /bin/mount $DATAFS /sysroot/opt
     else
         /bin/mount -M /opt /sysroot/opt
@@ -81,8 +81,8 @@ then
     if [ "$FIRSTBOOT" = "1" ]
     then
         /sbin/resize2fs -f $MODULES
-        /sbin/fsck -y $MODULES
     fi
+    /sbin/fsck -y $MODULES
     /bin/mount $MODULES /sysroot/usr/lib/modules
 fi