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

Side by Side Diff: bin/cros_run_vm_update

Issue 6413019: Robustify starting of ssh connection to vm updater. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « bin/cros_run_vm_test ('k') | lib/cros_vm_lib.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 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 # Updates an existing vm image with another image. 7 # Updates an existing vm image with another image.
8 8
9 # --- BEGIN COMMON.SH BOILERPLATE --- 9 # --- BEGIN COMMON.SH BOILERPLATE ---
10 # Load common CrOS utilities. Inside the chroot this file is installed in 10 # Load common CrOS utilities. Inside the chroot this file is installed in
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 # Parse command line. 44 # Parse command line.
45 FLAGS "$@" || exit 1 45 FLAGS "$@" || exit 1
46 eval set -- "${FLAGS_ARGV}" 46 eval set -- "${FLAGS_ARGV}"
47 47
48 [ -n "${FLAGS_vm_image_path}" ] || \ 48 [ -n "${FLAGS_vm_image_path}" ] || \
49 die "You must specify a path to a vm image." 49 die "You must specify a path to a vm image."
50 50
51 trap stop_kvm EXIT 51 trap stop_kvm EXIT
52 start_kvm "${FLAGS_vm_image_path}" 52 start_kvm "${FLAGS_vm_image_path}"
53 retry_until_ssh
53 54
54 if [ -n "${FLAGS_update_image_path}" ]; then 55 if [ -n "${FLAGS_update_image_path}" ]; then
55 IMAGE_ARGS="--image=$(readlink -f ${FLAGS_update_image_path})" 56 IMAGE_ARGS="--image=$(readlink -f ${FLAGS_update_image_path})"
56 fi 57 fi
57 58
58 if [ -n "${FLAGS_payload}" ]; then 59 if [ -n "${FLAGS_payload}" ]; then
59 IMAGE_ARGS="--payload=${FLAGS_payload}" 60 IMAGE_ARGS="--payload=${FLAGS_payload}"
60 fi 61 fi
61 62
62 if [ -n "${FLAGS_proxy_port}" ]; then 63 if [ -n "${FLAGS_proxy_port}" ]; then
63 IMAGE_ARGS="${IMAGE_ARGS} --proxy_port=${FLAGS_proxy_port}" 64 IMAGE_ARGS="${IMAGE_ARGS} --proxy_port=${FLAGS_proxy_port}"
64 fi 65 fi
65 66
66 "${SCRIPTS_DIR}/image_to_live.sh" \ 67 "${SCRIPTS_DIR}/image_to_live.sh" \
67 --for_vm \ 68 --for_vm \
68 --remote=127.0.0.1 \ 69 --remote=127.0.0.1 \
69 --ssh_port=${FLAGS_ssh_port} \ 70 --ssh_port=${FLAGS_ssh_port} \
70 --stateful_update_flag=${FLAGS_stateful_update_flag} \ 71 --stateful_update_flag=${FLAGS_stateful_update_flag} \
71 --src_image="${FLAGS_src_image}" \ 72 --src_image="${FLAGS_src_image}" \
72 --update_url="${FLAGS_update_url}" \ 73 --update_url="${FLAGS_update_url}" \
73 --verify \ 74 --verify \
74 ${IMAGE_ARGS} 75 ${IMAGE_ARGS}
75 76
OLDNEW
« no previous file with comments | « bin/cros_run_vm_test ('k') | lib/cros_vm_lib.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698