From: Hyotaek Shim Date: Thu, 7 Feb 2019 12:21:43 +0000 (+0900) Subject: Rename regarding fsck/resize2fs X-Git-Tag: submit/tizen/20190207.112658^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d2318c1d92e173f2405ceca64ad8174e1b6bd65;p=platform%2Fcore%2Fsystem%2Finitrd.git Rename regarding fsck/resize2fs Change-Id: I827455495952a4c34d6c23d5fcec8fd338e2d3c5 --- diff --git a/scripts/init.sh b/scripts/init.sh index 9b68864..981eabb 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -6,7 +6,6 @@ mount -o nosuid,noexec,nodev -t proc proc /proc /bin/mkdir /sysroot /bin/mkdir /opt -#Find devices ROOTFS=`/sbin/blkid -L rootfs` if [ x$ROOTFS = "x" ] then @@ -25,25 +24,24 @@ then DATAFS=`/sbin/blkid -t PARTLABEL=system-data -o device` fi -#Check and mount devices -FIRSTBOOT=1 +NEED_RESIZEFS=1 if [ x"$DATAFS" != "x" ] then /sbin/fsck -y $DATAFS /bin/mount $DATAFS /opt - if [ -e /opt/var/.fsck_done ] + if [ -e /opt/var/.resizefs_done ] then - FIRSTBOOT=0 + NEED_RESIZEFS=0 else - echo " " > /opt/var/.fsck_done + echo " " > /opt/var/.resizefs_done /bin/umount /opt fi fi if [ x$ROOTFS != "x" ] then - if [ "$FIRSTBOOT" = "1" ] + if [ "$NEED_RESIZEFS" = "1" ] then /sbin/resize2fs -f $ROOTFS fi @@ -56,9 +54,10 @@ fi if [ x"$DATAFS" != "x" ] then - if [ "$FIRSTBOOT" = "1" ] + if [ "$NEED_RESIZEFS" = "1" ] then /sbin/resize2fs -f $DATAFS + /sbin/fsck -y $DATAFS /bin/mount $DATAFS /sysroot/opt else /bin/mount -M /opt /sysroot/opt @@ -77,7 +76,7 @@ fi if [ x$MODULES != "x" ] then - if [ "$FIRSTBOOT" = "1" ] + if [ "$NEED_RESIZEFS" = "1" ] then /sbin/resize2fs -f $MODULES fi