Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: chromeos-postinst

Issue 3432020: postinst: don't abort after marking new part bootable. (Closed) Base URL: ssh://git@chromiumos-git/installer.git
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromeos-setimage » ('j') | chromeos-setimage » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos-postinst
diff --git a/chromeos-postinst b/chromeos-postinst
index 4a503e0885c5a7293a2bcd3916833e1690ca8760..4ac72b932907b8a33691a01f3020b02cd94b2c49 100755
--- a/chromeos-postinst
+++ b/chromeos-postinst
@@ -72,7 +72,7 @@ if [ "${FLAGS_postcommit}" -eq "${FLAGS_FALSE}" ]; then
# If this FS was mounted read-write, we can't do deltas from it. Mark the
# FS as such
- touch "${INSTALL_ROOT}/.nodelta" || true
+ touch "${INSTALL_ROOT}/.nodelta" || true 2>&1 > /dev/null
# TODO(zelidrag): http://crosbug/6367 - Remove this before the product is
# released. For now, this should recover users that reimaged their machine.
@@ -277,6 +277,11 @@ Partition ${NEW_PART_NUM}, Slot ${BOOT_SLOT}"
gpt -S boot -i $LEGACY_PART_NUM -b /tmp/oldpmbr.bin ${ROOT_DEV} 2>&1
fi
+ # At this point in the script, the new partition has been marked bootable
+ # and a reboot will boot into it. Thus, it's important that any future
+ # errors in this script do not cause this script to return failure.
+ set +e
+
# See if we need to update firmware. NOTE: we must activate new firmware
# only after new kernel is actived (installed and made bootable),
# otherwise new firmware with all old kernels may lead to recovery screen
« no previous file with comments | « no previous file | chromeos-setimage » ('j') | chromeos-setimage » ('J')

Powered by Google App Engine
This is Rietveld 408576698