diff options
author | INSUN PYO <insun.pyo@samsung.com> | 2019-03-08 19:14:17 +0900 |
---|---|---|
committer | INSUN PYO <insun.pyo@samsung.com> | 2019-03-11 19:47:24 +0900 |
commit | 16b02e24c2d954224fadd10c391848eaeaf987fe (patch) | |
tree | b38a00fc20b361826ddd1a408868951766ca7c62 | |
parent | 6d2318c1d92e173f2405ceca64ad8174e1b6bd65 (diff) | |
download | initrd-16b02e24c2d954224fadd10c391848eaeaf987fe.tar.gz initrd-16b02e24c2d954224fadd10c391848eaeaf987fe.tar.bz2 initrd-16b02e24c2d954224fadd10c391848eaeaf987fe.zip |
Perform resizefs for /opt/usrtizen_5.5.m2_releasesubmit/tizen_5.5_mobile_hotfix/20201026.185104submit/tizen_5.5/20191031.000004submit/tizen/20190311.123423accepted/tizen/unified/20190312.113103accepted/tizen/5.5/unified/mobile/hotfix/20201027.090540accepted/tizen/5.5/unified/20191031.022839tizen_5.5_mobile_hotfixaccepted/tizen_5.5_unified_mobile_hotfix
If device is encrypted, skip resizefs and fsck for /opt/usr.
Change-Id: Ib563b522f8eef201aca4c7103a2166d576e7051a
-rwxr-xr-x | scripts/init.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/init.sh b/scripts/init.sh index 981eabb..5aa6840 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -24,12 +24,25 @@ then DATAFS=`/sbin/blkid -t PARTLABEL=system-data -o device` fi +USERFS=`/sbin/blkid -L user` +if [ x$USERFS = "x" ] +then + USERFS=`/sbin/blkid -t PARTLABEL=user -o device` +fi + NEED_RESIZEFS=1 +USERFS_ENCRYPTED=0 if [ x"$DATAFS" != "x" ] then /sbin/fsck -y $DATAFS /bin/mount $DATAFS /opt + # The device is being encrypted or encrypted. + if [ -e /opt/etc/.odeprogress -o -e /opt/etc/.ode_* ] + then + USERFS_ENCRYPTED=1 + fi + if [ -e /opt/var/.resizefs_done ] then NEED_RESIZEFS=0 @@ -64,6 +77,15 @@ then fi fi +if [ x"$USERFS" != "x" -a "$USERFS_ENCRYPTED" = "0" ] +then + if [ "$NEED_RESIZEFS" = "1" ] + then + /sbin/resize2fs -f $USERFS + fi + /sbin/fsck -y $USERFS +fi + if [ -e /sysroot/opt/sqsh_usr.img ] then if [ ! -d /sysroot/usr ] |