scripts: tizen: call sync before umount
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 11 Jan 2018 03:51:51 +0000 (12:51 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 20 Oct 2020 01:39:02 +0000 (10:39 +0900)
After writing files on mounted directory, umount can fail with busy
state. Call sync before umount to clear the busy state instead of
sleep.

Change-Id: I7985ab3688a64b072c9a992957acdf124f925a34
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
scripts/tizen/sd_fusing_rpi3.sh
scripts/tizen/sd_fusing_xu4.sh

index a999641..2f262bf 100755 (executable)
@@ -231,7 +231,7 @@ function mkpart_3 () {
        mkdir mnt_tmp
        mount -t ext4 ${DISK}9 ./mnt_tmp
        touch ./mnt_tmp/reboot-param.bin
-       sleep 1
+       sync
        umount ./mnt_tmp
        rmdir mnt_tmp
 }
index bc5825f..ae564ce 100755 (executable)
@@ -123,6 +123,7 @@ function fusing_image () {
                mkdir mnt_tmp
                mount -t vfat $device ./mnt_tmp
                cp -f $fusing_img ./mnt_tmp
+               sync
                umount ./mnt_tmp
                rmdir mnt_tmp
                echo "fusing $fusing_img is done."