OLD | NEW |
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 Loading... |
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 Loading... |
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 $@ |
OLD | NEW |