| 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 20 matching lines...) Expand all Loading... |
| 31 rm -rf "${TMP}" | 31 rm -rf "${TMP}" |
| 32 } | 32 } |
| 33 | 33 |
| 34 function remote_reboot_sh { | 34 function remote_reboot_sh { |
| 35 rm -f "${TMP_KNOWN_HOSTS}" | 35 rm -f "${TMP_KNOWN_HOSTS}" |
| 36 remote_sh "$@" | 36 remote_sh "$@" |
| 37 } | 37 } |
| 38 | 38 |
| 39 function start_dev_server { | 39 function start_dev_server { |
| 40 kill_all_devservers | 40 kill_all_devservers |
| 41 ./enter_chroot.sh "cd ../platform/dev; ./start-devserver.sh>/dev/null 2>&1" & | 41 ./enter_chroot.sh "./start_devserver > /dev/null 2>&1" & |
| 42 echo -n "Waiting on devserver to start" | 42 echo -n "Waiting on devserver to start" |
| 43 until netstat -anp 2>&1 | grep 8080 > /dev/null; do | 43 until netstat -anp 2>&1 | grep 8080 > /dev/null; do |
| 44 sleep .5 | 44 sleep .5 |
| 45 echo -n "." | 45 echo -n "." |
| 46 done | 46 done |
| 47 echo "" | 47 echo "" |
| 48 } | 48 } |
| 49 | 49 |
| 50 function prepare_update_metadata { | 50 function prepare_update_metadata { |
| 51 remote_sh "mount -norw,remount /" | 51 remote_sh "mount -norw,remount /" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 fi | 184 fi |
| 185 | 185 |
| 186 remote_sh "grep ^CHROMEOS_RELEASE_DESCRIPTION= /etc/lsb-release" | 186 remote_sh "grep ^CHROMEOS_RELEASE_DESCRIPTION= /etc/lsb-release" |
| 187 local release_description=$(echo $REMOTE_OUT | cut -d '=' -f 2) | 187 local release_description=$(echo $REMOTE_OUT | cut -d '=' -f 2) |
| 188 echo "Update was successful and rebooted to $release_description" | 188 echo "Update was successful and rebooted to $release_description" |
| 189 | 189 |
| 190 return 0 | 190 return 0 |
| 191 } | 191 } |
| 192 | 192 |
| 193 main $@ | 193 main $@ |
| OLD | NEW |