| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |