Mount hal partition as read-only 37/278737/2
authorMateusz Moscicki <m.moscicki2@partner.samsung.com>
Mon, 25 Jul 2022 12:50:27 +0000 (14:50 +0200)
committerMateusz Moscicki <m.moscicki2@partner.samsung.com>
Mon, 25 Jul 2022 14:35:14 +0000 (16:35 +0200)
We don't want the data on this partition to change so that it can be
upgraded with DELTA_IMAGE upgrade.

Change-Id: I87487d345e48f0545361924ecc69788ade462649

scripts/fota-init.sh

index e49de49aac512162b3581105c6b551a9c9e00d1c..61cf618de787c0b0f7b2ce70fc7c51e61697e8d5 100755 (executable)
@@ -241,14 +241,14 @@ mount_partitions() {
                        return 1
                fi
        fi
-       if [ "${P_SUFFIX}" == "" ]; then
-               if [ ! "z${PART_HAL}" = "z" ]; then
+       if [ ! "z${PART_HAL}" = "z" ]; then
+               if [ "${P_SUFFIX}" == "" ]; then
                        if ! mount_checkpoint_partition hal "${PART_HAL}" "${FAKE_ROOT}/${HAL_MNT}"; then
                                return 1
                        fi
+               else
+                       "$MOUNT" -o ro "${PART_HAL}" "${FAKE_ROOT}/${HAL_MNT}"
                fi
-       else
-               "$MOUNT" "${PART_HAL}" "${FAKE_ROOT}/${HAL_MNT}"
        fi
 
        "$MOUNT" -t proc none "${FAKE_ROOT}/proc"