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

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

Issue 553063: Improvements for to continuous test loop. (Closed)
Patch Set: Created 10 years, 11 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 | src/scripts/run_remote_tests.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) 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 if [ ${FLAGS_ignore_hostname} -eq ${FLAGS_TRUE} ]; then 61 if [ ${FLAGS_ignore_hostname} -eq ${FLAGS_TRUE} ]; then
62 echo "Forcing update from ${HOSTNAME}" 62 echo "Forcing update from ${HOSTNAME}"
63 remote_sh "cat /etc/lsb-release |\ 63 remote_sh "cat /etc/lsb-release |\
64 grep -v '^CHROMEOS_AUSERVER=' |\ 64 grep -v '^CHROMEOS_AUSERVER=' |\
65 grep -v '^CHROMEOS_DEVSERVER=' > /etc/lsb-release~;\ 65 grep -v '^CHROMEOS_DEVSERVER=' > /etc/lsb-release~;\
66 mv /etc/lsb-release~ /etc/lsb-release; \ 66 mv /etc/lsb-release~ /etc/lsb-release; \
67 echo 'CHROMEOS_AUSERVER=http://$HOSTNAME:8080/update' >> \ 67 echo 'CHROMEOS_AUSERVER=http://$HOSTNAME:8080/update' >> \
68 /etc/lsb-release; \ 68 /etc/lsb-release; \
69 echo 'CHROMEOS_DEVSERVER=http://$HOSTNAME:8080' >> /etc/lsb-release" 69 echo 'CHROMEOS_DEVSERVER=http://$HOSTNAME:8080' >> /etc/lsb-release"
70 fi 70 fi
71
72 remote_sh "mount -noro,remount /"
73 } 71 }
74 72
75 function run_auto_update { 73 function run_auto_update {
76 echo "Starting update" 74 echo "Starting update"
77 local update_file=/var/log/softwareupdate.log 75 local update_file=/var/log/softwareupdate.log
78 # Clear it out so we don't see a prior run and make sure it 76 # Clear it out so we don't see a prior run and make sure it
79 # exists so the first tail below can't fail if it races the 77 # exists so the first tail below can't fail if it races the
80 # memento updater first write and wins. 78 # memento updater first write and wins.
81 remote_sh "rm -f ${update_file}; touch ${update_file}; \ 79 remote_sh "rm -f ${update_file}; touch ${update_file}; \
82 /opt/google/memento_updater/memento_updater.sh</dev/null>&/dev/null&" 80 /opt/google/memento_updater/memento_updater.sh</dev/null>&/dev/null&"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 fi 184 fi
187 185
188 remote_sh "grep ^CHROMEOS_RELEASE_DESCRIPTION= /etc/lsb-release" 186 remote_sh "grep ^CHROMEOS_RELEASE_DESCRIPTION= /etc/lsb-release"
189 local release_description=$(echo $REMOTE_OUT | cut -d '=' -f 2) 187 local release_description=$(echo $REMOTE_OUT | cut -d '=' -f 2)
190 echo "Update was successful and rebooted to $release_description" 188 echo "Update was successful and rebooted to $release_description"
191 189
192 return 0 190 return 0
193 } 191 }
194 192
195 main $@ 193 main $@
OLDNEW
« no previous file with comments | « no previous file | src/scripts/run_remote_tests.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698