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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 function start_dev_server { | 44 function start_dev_server { |
45 kill_all_devservers | 45 kill_all_devservers |
46 if [ ${FLAGS_verbose} -eq ${FLAGS_FALSE} ]; then | 46 if [ ${FLAGS_verbose} -eq ${FLAGS_FALSE} ]; then |
47 ./enter_chroot.sh "sudo ./start_devserver ${FLAGS_devserver_port} \ | 47 ./enter_chroot.sh "sudo ./start_devserver ${FLAGS_devserver_port} \ |
48 > dev_server.log 2>&1" & | 48 > dev_server.log 2>&1" & |
49 else | 49 else |
50 ./enter_chroot.sh "sudo ./start_devserver ${FLAGS_devserver_port}" & | 50 ./enter_chroot.sh "sudo ./start_devserver ${FLAGS_devserver_port}" & |
51 fi | 51 fi |
52 echo -n "Waiting on devserver to start" | 52 echo -n "Waiting on devserver to start" |
53 until netstat -anp 2>&1 | grep ${FLAGS_devserver_port} > /dev/null; do | 53 until netstat -anp 2>&1 | grep 0.0.0.0:${FLAGS_devserver_port} > /dev/null |
| 54 do |
54 sleep .5 | 55 sleep .5 |
55 echo -n "." | 56 echo -n "." |
56 done | 57 done |
57 echo "" | 58 echo "" |
58 } | 59 } |
59 | 60 |
60 # Copys stateful update script which fetches the newest stateful update | 61 # Copys stateful update script which fetches the newest stateful update |
61 # from the dev server and prepares the update. chromeos_startup finishes | 62 # from the dev server and prepares the update. chromeos_startup finishes |
62 # the update on next boot. | 63 # the update on next boot. |
63 function copy_stateful_update { | 64 function copy_stateful_update { |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 fi | 214 fi |
214 | 215 |
215 remote_sh "grep ^CHROMEOS_RELEASE_DESCRIPTION= /etc/lsb-release" | 216 remote_sh "grep ^CHROMEOS_RELEASE_DESCRIPTION= /etc/lsb-release" |
216 local release_description=$(echo $REMOTE_OUT | cut -d '=' -f 2) | 217 local release_description=$(echo $REMOTE_OUT | cut -d '=' -f 2) |
217 echo "Update was successful and rebooted to $release_description" | 218 echo "Update was successful and rebooted to $release_description" |
218 | 219 |
219 return 0 | 220 return 0 |
220 } | 221 } |
221 | 222 |
222 main $@ | 223 main $@ |
OLD | NEW |