Index: image_to_live.sh |
diff --git a/image_to_live.sh b/image_to_live.sh |
index 545e428b9281854cb9bac41e154cf2a100a0a3da..5cad5779a5348f780677685b9b08deae58444356 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 |
+ INITIAL_ROOT_DEV=$(find_root_dev) |
sosa
2010/12/21 03:25:09
use a local ... local initial_root_dev=
dgarrett
2010/12/21 03:50:41
Done.
|
+ |
if [ -z "${FLAGS_update_url}" ]; then |
# Start local devserver if no update url specified. |
start_dev_server |
@@ -391,6 +398,14 @@ function main() { |
info "Update was successful and rebooted to $release_description" |
fi |
+ if [ ${INITIAL_ROOT_DEV} -eq $(find_root_dev) ]; then |
sosa
2010/12/21 03:25:09
Put this under verify image flag above ... only if
dgarrett
2010/12/21 03:50:41
Done.
|
+ # 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. |
+ warn "The root partition did NOT change. The update failed." |
sosa
2010/12/21 03:25:09
use die rather than warn + return 1 -> error messa
dgarrett
2010/12/21 03:50:41
I was following the pattern from verify_image, but
|
+ return 1 |
+ fi |
+ |
print_time_elapsed |
exit 0 |