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

Side by Side Diff: chromeos-setimage

Issue 3432020: postinst: don't abort after marking new part bootable. (Closed) Base URL: ssh://git@chromiumos-git/installer.git
Patch Set: Created 10 years, 3 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 | « chromeos-postinst ('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/sh -u 1 #!/bin/sh -u
2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 # 5 #
6 # A script to display or change the preferred image 6 # A script to display or change the preferred image
7 7
8 # Load functions and constants for chromeos-install. 8 # Load functions and constants for chromeos-install.
9 . "$(dirname "$0")/chromeos-common.sh" || exit 1 9 . "$(dirname "$0")/chromeos-common.sh" || exit 1
10 if [ -e /usr/lib/shflags ]; then 10 if [ -e /usr/lib/shflags ]; then
(...skipping 17 matching lines...) Expand all
28 if [ -e ${DEV_BUILD_FILE} ]; then 28 if [ -e ${DEV_BUILD_FILE} ]; then
29 echo "Developer image detected." 29 echo "Developer image detected."
30 rootfs_verification_default=${FLAGS_FALSE} 30 rootfs_verification_default=${FLAGS_FALSE}
31 ignore_bad_verification_default=${FLAGS_TRUE} 31 ignore_bad_verification_default=${FLAGS_TRUE}
32 fi 32 fi
33 33
34 # Any build that is verified will stay verified. 34 # Any build that is verified will stay verified.
35 # We need to check that there is a root device, 35 # We need to check that there is a root device,
36 # factory install runs from tmpfs and rootdev does not 36 # factory install runs from tmpfs and rootdev does not
37 # return a meaningful result in that case. 37 # return a meaningful result in that case.
38 if rootdev -s &> /dev/null; then 38 if rootdev -s 2>&1 > /dev/null; then
39 if type rootdev &> /dev/null; then 39 if type rootdev 2>&1 > /dev/null; then
Will Drewry 2010/09/23 01:57:36 change is fine, but I dunno why we do type rootdev
40 # Enable verification, but don't force a check for dev builds. 40 # Enable verification, but don't force a check for dev builds.
41 if rootdev | grep -qE '^/dev/(dm-|mapper/)'; then 41 if rootdev | grep -qE '^/dev/(dm-|mapper/)'; then
42 rootfs_verification_default=${FLAGS_TRUE} 42 rootfs_verification_default=${FLAGS_TRUE}
43 ignore_bad_verification_default=${FLAGS_FALSE} 43 ignore_bad_verification_default=${FLAGS_FALSE}
44 fi 44 fi
45 fi 45 fi
46 fi 46 fi
47 47
48 DEFINE_string dst "" "Boot device to update (Default: current root device)" 48 DEFINE_string dst "" "Boot device to update (Default: current root device)"
49 # Any time the verified boot flags change, this is needed 49 # Any time the verified boot flags change, this is needed
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 grep -qs '^set default=3' ${mountpoint}/efi/boot/grub.cfg && echo "B (verified)" 332 grep -qs '^set default=3' ${mountpoint}/efi/boot/grub.cfg && echo "B (verified)"
333 333
334 echo "Current legacy boot default is:" 334 echo "Current legacy boot default is:"
335 # Print the [new] default choice 335 # Print the [new] default choice
336 grep -qs 's-hd\.A$' ${mountpoint}/syslinux/default.cfg && echo "A" 336 grep -qs 's-hd\.A$' ${mountpoint}/syslinux/default.cfg && echo "A"
337 grep -qs 's-hd\.B$' ${mountpoint}/syslinux/default.cfg && echo "B" 337 grep -qs 's-hd\.B$' ${mountpoint}/syslinux/default.cfg && echo "B"
338 grep -qs 'vhd\.A$' ${mountpoint}/syslinux/default.cfg && echo "A (verified)" 338 grep -qs 'vhd\.A$' ${mountpoint}/syslinux/default.cfg && echo "A (verified)"
339 grep -qs 'vhd\.B$' ${mountpoint}/syslinux/default.cfg && echo "B (verified)" 339 grep -qs 'vhd\.B$' ${mountpoint}/syslinux/default.cfg && echo "B (verified)"
340 340
341 exit 0 341 exit 0
OLDNEW
« no previous file with comments | « chromeos-postinst ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698