No more check the number of partition from fstab
[platform/core/system/initrd-fota.git] / 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}