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

Side by Side Diff: src/scripts/image_to_live.sh

Issue 1609025: Add ssh cleanup to avoid leaving running agents around when imaging problems. (Closed)
Patch Set: Created 10 years, 8 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
« no previous file with comments | « no previous file | no next file » | 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) 2009 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2009 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 12 matching lines...) Expand all
23 23
24 function kill_all_devservers { 24 function kill_all_devservers {
25 # Using ! here to avoid exiting with set -e is insufficient, so use 25 # Using ! here to avoid exiting with set -e is insufficient, so use
26 # || true instead. 26 # || true instead.
27 pkill -fx ".*devserver\.py" || true 27 pkill -fx ".*devserver\.py" || true
28 } 28 }
29 29
30 function cleanup { 30 function cleanup {
31 echo "Killing dev server." 31 echo "Killing dev server."
32 kill_all_devservers 32 kill_all_devservers
33 cleanup_remote_access
33 rm -rf "${TMP}" 34 rm -rf "${TMP}"
34 } 35 }
35 36
36 function remote_reboot_sh { 37 function remote_reboot_sh {
37 rm -f "${TMP_KNOWN_HOSTS}" 38 rm -f "${TMP_KNOWN_HOSTS}"
38 remote_sh "$@" 39 remote_sh "$@"
39 } 40 }
40 41
41 function start_dev_server { 42 function start_dev_server {
42 kill_all_devservers 43 kill_all_devservers
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 fi 191 fi
191 192
192 remote_sh "grep ^CHROMEOS_RELEASE_DESCRIPTION= /etc/lsb-release" 193 remote_sh "grep ^CHROMEOS_RELEASE_DESCRIPTION= /etc/lsb-release"
193 local release_description=$(echo $REMOTE_OUT | cut -d '=' -f 2) 194 local release_description=$(echo $REMOTE_OUT | cut -d '=' -f 2)
194 echo "Update was successful and rebooted to $release_description" 195 echo "Update was successful and rebooted to $release_description"
195 196
196 return 0 197 return 0
197 } 198 }
198 199
199 main $@ 200 main $@
OLDNEW
« 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