STATUS_DIR="/opt/data/update"
SCRIPT_NAME="upgrade-prepare-partitions.sh"
LOG_FILE="/tmp/upgrade-prepare-partitions.log"
+HAL_UPGRADE_CFG_DIR="/hal/etc/upgrade/"
+HAL_PART_LIST_FILE="background_copy.list"
#------------------------------------------------
# log msg [file]
#------------------------------------------------
background_copy() {
flog "[Info] Background copying A|B partitions for update..."
- for partition_name in boot ramdisk recovery modules hal rootfs; do
+ for partition_name in ${PARTITION_LIST}; do
# echo is there to suspend abort when partition will not be found e.g. hal
if ! CURRENT_PARTITION="$(/usr/bin/blkid-print "$EMMC_DEVICE" "$partition_name" "$CURRENT_AB" |\
sed -E 's|(part_nr: [0-9]+ )\((.*)\): (.*)|\3|' || echo "__FALSE__")" || \
done
}
+load_background_copy_list() {
+ PARTITION_LIST=$(grep -v -e "^#" -e "^$" ${HAL_UPGRADE_CFG_DIR}/${HAL_PART_LIST_FILE})
+}
check_ab_partition_scheme
check_used_block_device
create_update_dirs
+load_background_copy_list
background_copy