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

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

Issue 2031002: Enforce image update from image_to_live. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: Created 10 years, 7 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 echo 'CHROMEOS_DEVSERVER=${devserver_url}' >> /etc/lsb-release" 92 echo 'CHROMEOS_DEVSERVER=${devserver_url}' >> /etc/lsb-release"
93 fi 93 fi
94 } 94 }
95 95
96 function run_auto_update { 96 function run_auto_update {
97 echo "Starting update" 97 echo "Starting update"
98 local update_file=/var/log/softwareupdate.log 98 local update_file=/var/log/softwareupdate.log
99 # Clear it out so we don't see a prior run and make sure it 99 # Clear it out so we don't see a prior run and make sure it
100 # exists so the first tail below can't fail if it races the 100 # exists so the first tail below can't fail if it races the
101 # memento updater first write and wins. 101 # memento updater first write and wins.
102 remote_sh "rm -f ${update_file}; touch ${update_file}; \ 102 remote_sh "rm -f /tmp/memento_autoupdate_completed; rm -f ${update_file}; \
103 /opt/google/memento_updater/memento_updater.sh</dev/null>&/dev/null&" 103 touch ${update_file}; \
104 /opt/google/memento_updater/memento_updater.sh --force_update < /dev/null\
105 >&/dev/null&"
104 106
105 local update_error 107 local update_error
106 local output_file 108 local output_file
107 local progress 109 local progress
108 110
109 update_error=1 111 update_error=1
110 output_file="${TMP}/output" 112 output_file="${TMP}/output"
111 113
112 while true; do 114 while true; do
113 # The softwareupdate.log gets pretty bit with download progress 115 # The softwareupdate.log gets pretty bit with download progress
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 fi 213 fi
212 214
213 remote_sh "grep ^CHROMEOS_RELEASE_DESCRIPTION= /etc/lsb-release" 215 remote_sh "grep ^CHROMEOS_RELEASE_DESCRIPTION= /etc/lsb-release"
214 local release_description=$(echo $REMOTE_OUT | cut -d '=' -f 2) 216 local release_description=$(echo $REMOTE_OUT | cut -d '=' -f 2)
215 echo "Update was successful and rebooted to $release_description" 217 echo "Update was successful and rebooted to $release_description"
216 218
217 return 0 219 return 0
218 } 220 }
219 221
220 main $@ 222 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