OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # Script to update an image onto a live running ChromiumOS instance. | 7 # Script to update an image onto a live running ChromiumOS instance. |
8 | 8 |
9 # Load common constants. This should be the first executable line. | 9 # Load common constants. This should be the first executable line. |
10 # The path to common.sh should be relative to your script's location. | 10 # The path to common.sh should be relative to your script's location. |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 warn "Machine is in a bad state. Rebooting it now." | 339 warn "Machine is in a bad state. Rebooting it now." |
340 remote_reboot | 340 remote_reboot |
341 fi | 341 fi |
342 | 342 |
343 if [ -z "${FLAGS_update_url}" ]; then | 343 if [ -z "${FLAGS_update_url}" ]; then |
344 # Start local devserver if no update url specified. | 344 # Start local devserver if no update url specified. |
345 start_dev_server | 345 start_dev_server |
346 fi | 346 fi |
347 | 347 |
348 if [ ${FLAGS_update} -eq ${FLAGS_TRUE} ] && ! run_auto_update; then | 348 if [ ${FLAGS_update} -eq ${FLAGS_TRUE} ] && ! run_auto_update; then |
| 349 warn "Dumping update_engine.log for debugging and/or bug reporting." |
| 350 tail -n 200 "${FLAGS_update_log}" >&2 |
349 die "Update was not successful." | 351 die "Update was not successful." |
350 fi | 352 fi |
351 | 353 |
352 if [ ${FLAGS_update_stateful} -eq ${FLAGS_TRUE} ] && \ | 354 if [ ${FLAGS_update_stateful} -eq ${FLAGS_TRUE} ] && \ |
353 ! run_stateful_update; then | 355 ! run_stateful_update; then |
354 warn "Stateful update was not successful." | 356 warn "Stateful update was not successful." |
355 fi | 357 fi |
356 | 358 |
357 remote_reboot | 359 remote_reboot |
358 | 360 |
(...skipping 13 matching lines...) Expand all Loading... |
372 local release_description=$(echo ${REMOTE_OUT} | cut -d '=' -f 2) | 374 local release_description=$(echo ${REMOTE_OUT} | cut -d '=' -f 2) |
373 info "Update was successful and rebooted to $release_description" | 375 info "Update was successful and rebooted to $release_description" |
374 fi | 376 fi |
375 | 377 |
376 print_time_elapsed | 378 print_time_elapsed |
377 | 379 |
378 exit 0 | 380 exit 0 |
379 } | 381 } |
380 | 382 |
381 main $@ | 383 main $@ |
OLD | NEW |