This change is to prevent re-executing an upgrade if the system was
booted in FOTA mode for reasons other than the actual upgrade.
Change-Id: Ib5dc49c42b8878d8389f17d678526ff51f1ba39d
SDB_RULE=${UPDATE_DATA_DIR}/99-sdb-switch.rules
RW_MACRO=@TZ_SYS_UPGRADE@/rw-update-macro.inc
+RW_UPDATE_FLAG=/opt/.do_rw_update
DEBUG()
{
echo "$1" > ${UPDATE_RESULT_FILE}
}
+if [[ $(</proc/cmdline) =~ partition_ab= ]] && [ ! -f ${RW_UPDATE_FLAG} ]
+then
+ NOTIFY "${RW_UPDATE_FLAG} file does not exist. Cancel RW Upgrade."
+ exit
+fi
+
NOTIFY "----------------------------------------------------------------------"
NOTIFY "System RW update: rw update started"
rm ${SDB_RULE}
fi
-rm /opt/.do_rw_update
+rm ${RW_UPDATE_FLAG}
/bin/sync
NOTIFY "----------------------------------------------------------------------"