OLD | NEW |
1 #!/bin/sh -e | 1 #!/bin/sh -e |
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 . "$(dirname "$0")/chromeos-common.sh" | 7 . "$(dirname "$0")/chromeos-common.sh" |
8 . "/opt/google/memento_updater/memento_updater_logging.sh" | 8 . "/opt/google/memento_updater/memento_updater_logging.sh" |
9 | 9 |
10 if [ $(id -u) -ne 0 ]; then | 10 if [ $(id -u) -ne 0 ]; then |
11 echo "You must run this as root." | 11 echo "You must run this as root." |
12 exit 1 | 12 exit 1 |
13 fi | 13 fi |
14 | 14 |
15 # If we get in a respawn loop, sleeping for 1 minute before starting is nice. | |
16 sleep 60 | |
17 | |
18 # TODO(adlr): pick an install device in a matter that works on x86 and ARM. | 15 # TODO(adlr): pick an install device in a matter that works on x86 and ARM. |
19 # This works on x86 only, afaik. | 16 # This works on x86 only, afaik. |
20 DST=/dev/sda | 17 DST=/dev/sda |
21 DST_FACTORY_PART=3 | 18 DST_FACTORY_PART=3 |
22 DST_RELEASE_PART=5 | 19 DST_RELEASE_PART=5 |
23 DST_OEM_PART=8 | 20 DST_OEM_PART=8 |
24 DST_STATE_PART=1 | 21 DST_STATE_PART=1 |
25 | 22 |
26 log "Factory Install: Setting partition table" | 23 log "Factory Install: Setting partition table" |
27 | 24 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 if [ "$RESULT" != "UPDATED" ]; then | 57 if [ "$RESULT" != "UPDATED" ]; then |
61 log "Factory Install: AU failed" | 58 log "Factory Install: AU failed" |
62 exit 1 | 59 exit 1 |
63 fi | 60 fi |
64 done | 61 done |
65 | 62 |
66 log "All done installing." | 63 log "All done installing." |
67 | 64 |
68 shutdown -r now | 65 shutdown -r now |
69 sleep 1d # sleep indefinitely to avoid respawning rather than shutting down | 66 sleep 1d # sleep indefinitely to avoid respawning rather than shutting down |
OLD | NEW |