Clear boot mode and set boot success after upgrade 11/269211/1 accepted/tizen/unified/20220114.130053 submit/tizen/20220113.114919
authorMateusz Moscicki <m.moscicki2@partner.samsung.com>
Tue, 11 Jan 2022 09:31:17 +0000 (10:31 +0100)
committerMateusz Moscicki <m.moscicki2@partner.samsung.com>
Tue, 11 Jan 2022 09:31:17 +0000 (10:31 +0100)
Change-Id: I8d16c29d18b8a9d03c73d0556a2a9d2954664198

upgrade/update-finalize.sh.in

index 7c47741..e1f119b 100755 (executable)
@@ -13,10 +13,12 @@ else
 fi
 
 # TOOD: check if system is stable
-if true; then
+UPDATE_SUCCESS=1
+
+if [ -z ${UPDATE_PREPARE_ERR+x} ] && [ "${UPDATE_SUCCESS}" == "1" ]; then
+       /usr/bin/device_board_clear_boot_mode
        COMMIT_CHANGES
+       /usr/bin/device_board_set_boot_success
+else
+       reboot -f fota
 fi
-
-# TODO: Replace this by calling the appropriate commands
-touch /tmp/set_BOOTING_OK
-touch /tmp/booting_change_bootmode