No more check the number of partition from fstab 58/231558/1 accepted/tizen/unified/20200528.132850 submit/tizen/20200526.104742
authorKichan Kwon <k_c.kwon@samsung.com>
Wed, 22 Apr 2020 10:13:53 +0000 (19:13 +0900)
committerKichan Kwon <k_c.kwon@samsung.com>
Wed, 22 Apr 2020 10:15:53 +0000 (19:15 +0900)
- No more partition information is updated to fstab
- FYI, mount path is fixed : /opt and /opt/usr

Change-Id: I5098ae587b5afd84add70e2ea912b352cfc81c9a
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
scripts/fota-init.sh

index 34ea885..d15e5c9 100755 (executable)
@@ -50,17 +50,6 @@ get_partition_id() {
 }
 
 #------------------------------------------------
-#       check_user_partition
-#------------------------------------------------
-check_user_partition() {
-       RET=$("$CAT" ${FAKE_ROOT}/etc/fstab | "$GREP" "user")
-       if [ "z$RET" = "z" ]; then
-               return 0
-       fi
-       return 1
-}
-
-#------------------------------------------------
 #       mount_partitions
 #------------------------------------------------
 mount_partitions() {
@@ -69,9 +58,7 @@ mount_partitions() {
        "$MOUNT" -t ext4 -o ro ${PART_ROOTFS} ${FAKE_ROOT}
        "$MOUNT" -t ext4 ${PART_SYSTEM_DATA} ${FAKE_ROOT}/${SYSTEM_DATA_MNT}
 
-       check_user_partition
-       WITH_USR_PART=$?
-       if [ "$WITH_USR_PART" = "1" ]; then
+       if [ ! "z${PART_USER}" = "z" ]; then
                "$MOUNT" -t ext4 ${PART_USER} ${FAKE_ROOT}/${USER_MNT}
        fi
 
@@ -91,7 +78,7 @@ umount_partitions() {
        "$UMOUNT" ${FAKE_ROOT}/sys
        "$UMOUNT" ${FAKE_ROOT}/proc
 
-       if [ "$WITH_USR_PART" = "1" ]; then
+       if [ ! "z${PART_USER}" = "z" ]; then
                "$UMOUNT" ${FAKE_ROOT}/${USER_MNT}
        fi
        "$UMOUNT" ${FAKE_ROOT}/${SYSTEM_DATA_MNT}