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

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: drop use of variables that are not available in the context of this script 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 touch /mnt/stateful_partition/.developer_mode 94 touch /mnt/stateful_partition/.developer_mode
95 fi 95 fi
96 96
97 # Flush linux caches. 97 # Flush linux caches.
98 sync 98 sync
99 echo 3 > /proc/sys/vm/drop_caches 99 echo 3 > /proc/sys/vm/drop_caches
100 100
101 # Do any board specific wiping here. 101 # Do any board specific wiping here.
102 # board_factory_wipe.sh will be installed by the board overlay if necessary. 102 # board_factory_wipe.sh will be installed by the board overlay if necessary.
103 if [ "$FACTORY_WIPE" = "factory" ]; then 103 if [ "$FACTORY_WIPE" = "factory" ]; then
104 FIRMWARE_WIPE='/usr/sbin/firmware-factory-wipe'
105 if [ -x "${FIRMWARE_WIPE}" ]; then
106 ${FIRMWARE_WIPE}
107 fi
108
104 BOARD_WIPE=/usr/sbin/board_factory_wipe.sh 109 BOARD_WIPE=/usr/sbin/board_factory_wipe.sh
105 if [ -x "${BOARD_WIPE}" ]; then 110 if [ -x "${BOARD_WIPE}" ]; then
106 ${BOARD_WIPE} 111 ${BOARD_WIPE}
107 fi 112 fi
108 fi 113 fi
109 114
110 /sbin/shutdown -r now 115 /sbin/shutdown -r now
111 sleep 1d # Wait for shutdown 116 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