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

Unified Diff: src/platform/installer/chromeos-common.sh

Issue 1512001: test-fixet: Automated VMWare test of AutoUpdate (Closed)
Patch Set: fixes for review Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/platform/memento_softwareupdate/autoupdated_vm_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/installer/chromeos-common.sh
diff --git a/src/platform/installer/chromeos-common.sh b/src/platform/installer/chromeos-common.sh
index 6a82e6d0488eaf471dedc8ecc824332d6cb1b503..0da28e31416b5800e52e85d1367506907804aa72 100644
--- a/src/platform/installer/chromeos-common.sh
+++ b/src/platform/installer/chromeos-common.sh
@@ -92,10 +92,10 @@ fi
# This installs a GPT into the specified device or file, using the given
-# components. If the target is a block device we'll do a full install.
-# Otherwise, it'll be just enough to boot.
+# components. If the target is a block device or the FORCE_FULL arg is "true"
+# we'll do a full install. Otherwise, it'll be just enough to boot.
# Invoke as: command (not subshell)
-# Args: TARGET ROOTFS_IMG KERNEL_IMG STATEFUL_IMG PMBRCODE
+# Args: TARGET ROOTFS_IMG KERNEL_IMG STATEFUL_IMG PMBRCODE FORCE_FULL
# Return: nothing
# Side effects: Sets these global variables describing the GPT partitions
# (all untis are 512-byte sectors):
@@ -115,6 +115,7 @@ install_gpt() {
local kernel_img=$3
local stateful_img=$4
local pmbrcode=$5
+ local force_full="${6:-}"
# The gpt tool requires a fixed-size target to work on, so we may have to
# create a file of the appropriate size. Let's figure out what that size is
@@ -159,9 +160,13 @@ install_gpt() {
local start_useful=$(roundup $num_header_sectors)
# What are we doing?
- if [ -b $outdev ]; then
+ if [[ -b "$outdev" || "$force_full" = "true" ]]; then
# Block device, need to be root.
- local sudo=sudo
+ if [[ -b "$outdev" ]]; then
+ local sudo=sudo
+ else
+ local sudo=""
+ fi
# Full install, use max sizes and create both A & B images.
NUM_KERN_SECTORS=$max_kern_sectors
« no previous file with comments | « no previous file | src/platform/memento_softwareupdate/autoupdated_vm_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698