diff options
author | INSUN PYO <insun.pyo@samsung.com> | 2019-03-13 15:05:18 +0900 |
---|---|---|
committer | INSUN PYO <insun.pyo@samsung.com> | 2019-11-11 22:41:42 +0000 |
commit | 371a5daeb972edc6f5c4845eafb4f7549fc40b2f (patch) | |
tree | 172c3f1ab9743be44d6cce47a283978cd4b026b8 | |
parent | 16b02e24c2d954224fadd10c391848eaeaf987fe (diff) | |
download | initrd-371a5daeb972edc6f5c4845eafb4f7549fc40b2f.tar.gz initrd-371a5daeb972edc6f5c4845eafb4f7549fc40b2f.tar.bz2 initrd-371a5daeb972edc6f5c4845eafb4f7549fc40b2f.zip |
Fix race condition
Power is turned off as soon as /opt/var/.resizefs_done is written.
Rootfs, userfs and module partition does not execute resizefs foreever.
Change-Id: I5eb2ebb3135443ff21cbbaf4944f0a759940e76a
(cherry picked from commit b6bd0d6331bc72e049023bdbe1265c0174d871fd)
-rwxr-xr-x | scripts/init.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/init.sh b/scripts/init.sh index 5aa6840..7b884de 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -47,7 +47,6 @@ then then NEED_RESIZEFS=0 else - echo " " > /opt/var/.resizefs_done /bin/umount /opt fi fi @@ -106,6 +105,11 @@ then /bin/mount $MODULES /sysroot/usr/lib/modules fi +if [ x"$DATAFS" != "x" -a "$NEED_RESIZEFS" = "1" ] +then + echo " " > /sysroot/opt/var/.resizefs_done +fi + cd /sysroot mkdir -p ./dev ./sys ./proc ./initrd /sbin/pivot_root . ./initrd |