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

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

Issue 1912005: Rename update script and update some documentation. (Closed) Base URL: ssh://git@chromiumos-git//chromeos
Patch Set: Add script 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 | « src/platform/dev/stateful_update ('k') | 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 echo "" 54 echo ""
55 } 55 }
56 56
57 # Copys stateful update script which fetches the newest stateful update 57 # Copys stateful update script which fetches the newest stateful update
58 # from the dev server and prepares the update. chromeos_startup finishes 58 # from the dev server and prepares the update. chromeos_startup finishes
59 # the update on next boot. 59 # the update on next boot.
60 function copy_stateful_update { 60 function copy_stateful_update {
61 echo "Starting stateful update." 61 echo "Starting stateful update."
62 local dev_dir="$(dirname $0)/../platform/dev" 62 local dev_dir="$(dirname $0)/../platform/dev"
63 63
64 # Copy over tar files. 64 # Copy over update script and run update.
65 remote_cp "$dev_dir/stateful_update.sh" "/tmp" 65 remote_cp "$dev_dir/stateful_update" "/tmp"
66 remote_sh "/tmp/stateful_update.sh" 66 remote_sh "/tmp/stateful_update"
67 } 67 }
68 68
69 function prepare_update_metadata { 69 function prepare_update_metadata {
70 remote_sh "mount -norw,remount /" 70 remote_sh "mount -norw,remount /"
71 71
72 if [[ ${FLAGS_ignore_version} -eq ${FLAGS_TRUE} ]]; then 72 if [[ ${FLAGS_ignore_version} -eq ${FLAGS_TRUE} ]]; then
73 echo "Forcing update independent of the current version" 73 echo "Forcing update independent of the current version"
74 remote_sh "cat /etc/lsb-release |\ 74 remote_sh "cat /etc/lsb-release |\
75 grep -v CHROMEOS_RELEASE_VERSION > /etc/lsb-release~;\ 75 grep -v CHROMEOS_RELEASE_VERSION > /etc/lsb-release~;\
76 mv /etc/lsb-release~ /etc/lsb-release; \ 76 mv /etc/lsb-release~ /etc/lsb-release; \
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 fi 207 fi
208 208
209 remote_sh "grep ^CHROMEOS_RELEASE_DESCRIPTION= /etc/lsb-release" 209 remote_sh "grep ^CHROMEOS_RELEASE_DESCRIPTION= /etc/lsb-release"
210 local release_description=$(echo $REMOTE_OUT | cut -d '=' -f 2) 210 local release_description=$(echo $REMOTE_OUT | cut -d '=' -f 2)
211 echo "Update was successful and rebooted to $release_description" 211 echo "Update was successful and rebooted to $release_description"
212 212
213 return 0 213 return 0
214 } 214 }
215 215
216 main $@ 216 main $@
OLDNEW
« no previous file with comments | « src/platform/dev/stateful_update ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698