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

Unified Diff: image_to_live.sh

Issue 6045004: image_to_live verifies root_dev changed (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Fixed Nits. Created 10 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: image_to_live.sh
diff --git a/image_to_live.sh b/image_to_live.sh
index 545e428b9281854cb9bac41e154cf2a100a0a3da..658b2d33d60fc9cb129b11c2a1f80984333ba5c9 100755
--- a/image_to_live.sh
+++ b/image_to_live.sh
@@ -329,6 +329,11 @@ function verify_image {
fi
}
+function find_root_dev {
+ remote_sh "rootdev -s"
+ echo ${REMOTE_OUT}
+}
+
function main() {
assert_outside_chroot
@@ -356,6 +361,8 @@ function main() {
remote_reboot
fi
+ local initial_root_dev=$(find_root_dev)
+
if [ -z "${FLAGS_update_url}" ]; then
# Start local devserver if no update url specified.
start_dev_server
@@ -386,6 +393,13 @@ function main() {
remote_sh "grep ^CHROMEOS_RELEASE_DESCRIPTION= /etc/lsb-release"
if [ ${FLAGS_verify} -eq ${FLAGS_TRUE} ]; then
verify_image
+
+ if [ "${initial_root_dev}" == "$(find_root_dev)" ]; then
+ # At this point, the software version didn't change, but we didn't
+ # switch partitions either. Means it was an update to the same version
+ # that failed.
+ die "The root partition did NOT change. The update failed."
+ fi
else
local release_description=$(echo ${REMOTE_OUT} | cut -d '=' -f 2)
info "Update was successful and rebooted to $release_description"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698