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

Side by Side Diff: clobber-state

Issue 6623030: Call firmware wipe script during factory wipe if it exists (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/init.git@master
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« 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/sh 1 #!/bin/sh
2 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 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 # This script can be called during startup to trash the stateful partition 7 # This script can be called during startup to trash the stateful partition
8 # and possibly reset the other root filesystem 8 # and possibly reset the other root filesystem
9 9
10 . /usr/sbin/chromeos-common.sh 10 . /usr/sbin/chromeos-common.sh
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 touch /mnt/stateful_partition/.developer_mode 105 touch /mnt/stateful_partition/.developer_mode
106 fi 106 fi
107 107
108 # Flush linux caches. 108 # Flush linux caches.
109 sync 109 sync
110 echo 3 > /proc/sys/vm/drop_caches 110 echo 3 > /proc/sys/vm/drop_caches
111 111
112 # Do any board specific wiping here. 112 # Do any board specific wiping here.
113 # board_factory_wipe.sh will be installed by the board overlay if necessary. 113 # board_factory_wipe.sh will be installed by the board overlay if necessary.
114 if [ "$FACTORY_WIPE" = "factory" ]; then 114 if [ "$FACTORY_WIPE" = "factory" ]; then
115 FIRMWARE_WIPE='/usr/sbin/firmware-factory-wipe'
116 FIRMWARE_WIPE_LOGS='/mnt/stateful_partition/var/log/update_firmware.log'
117 if [ -x "$FIRMWARE_WIPE" ]; then
118 if [ "$DEVMODE" = "1" -o -f /root/.dev_mode ]; then
Nick Sanders 2011/03/05 04:46:43 I don't think DEVMODE is set here..
119 # More message on console for developer mode and dev builds
120 FIRMWARE_WIPE_LOGS="/dev/tty1 $FIRMWARE_WIPE_LOGS"
121 fi
122 mkdir -p /mnt/stateful_partition/var/log
123 [ -z "$BOOT_SPLASH_PID" ] || wait $BOOT_SPLASH_PID
Nick Sanders 2011/03/05 04:46:43 I don't think this will persist either?
124 chromeos-boot-alert update_firmware /dev/tty1
125 IS_CHROMEOS_STARTUP=1 "$FIRMWARE_WIPE" 2>&1 |
126 tee -a $FIRMWARE_WIPE_LOGS
127 fi
128
115 BOARD_WIPE=/usr/sbin/board_factory_wipe.sh 129 BOARD_WIPE=/usr/sbin/board_factory_wipe.sh
116 if [ -x "${BOARD_WIPE}" ]; then 130 if [ -x "${BOARD_WIPE}" ]; then
117 ${BOARD_WIPE} 131 ${BOARD_WIPE}
118 fi 132 fi
119 fi 133 fi
120 134
121 /sbin/shutdown -r now 135 /sbin/shutdown -r now
122 sleep 1d # Wait for shutdown 136 sleep 1d # Wait for shutdown
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