OLD | NEW |
1 #!/bin/dash | 1 #!/bin/dash |
2 # Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved. | 2 # Copyright (c) 2009-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 TRY_BASH=1 | 6 TRY_BASH=1 |
7 if echo "$@" | grep -q -- "--dash"; then | 7 if echo "$@" | grep -q -- "--dash"; then |
8 TRY_BASH=0 | 8 TRY_BASH=0 |
9 fi | 9 fi |
10 | 10 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 if ! $CHROMEOS_INSTALL --dst=/dev/null | grep -q "removable"; then | 107 if ! $CHROMEOS_INSTALL --dst=/dev/null | grep -q "removable"; then |
108 REMOVABLE=1 | 108 REMOVABLE=1 |
109 fi | 109 fi |
110 fi | 110 fi |
111 | 111 |
112 if [ "$(echo "$@" | grep -- "--usb")" -o "$REMOVABLE" = "1" ]; then | 112 if [ "$(echo "$@" | grep -- "--usb")" -o "$REMOVABLE" = "1" ]; then |
113 . "$(dirname "$0")/crosh-usb" | 113 . "$(dirname "$0")/crosh-usb" |
114 fi | 114 fi |
115 | 115 |
116 # TODO(rginda): Switch to the "real" dev mode file when we have one. | 116 # TODO(rginda): Switch to the "real" dev mode file when we have one. |
117 /bin/cros_boot_mode -s -m developer | 117 /usr/bin/crossystem cros_debug?1 |
118 DEVMODE=$((!$?)) | 118 DEVMODE=$((!$?)) |
119 # Force dev behavior on dev images | 119 # Force dev behavior on dev images |
120 # TODO(wad) replace with a cros_boot_mode arg once supported. | 120 # TODO(wad,rspangler) replace with a crossystem arg once cros_debug checks this |
| 121 # too. |
121 if [ -f "/root/.dev_mode" ]; then | 122 if [ -f "/root/.dev_mode" ]; then |
122 DEVMODE=1 | 123 DEVMODE=1 |
123 fi | 124 fi |
124 | 125 |
125 if [ "$(echo "$@" | grep -- "--dev")" -o "$DEVMODE" = "1" ]; then | 126 if [ "$(echo "$@" | grep -- "--dev")" -o "$DEVMODE" = "1" ]; then |
126 . "$(dirname "$0")/crosh-dev" | 127 . "$(dirname "$0")/crosh-dev" |
127 fi | 128 fi |
128 | 129 |
129 if [ -e "$(dirname $0)/crosh-workarounds" ]; then | 130 if [ -e "$(dirname $0)/crosh-workarounds" ]; then |
130 . "$(dirname "$0")/crosh-workarounds" | 131 . "$(dirname "$0")/crosh-workarounds" |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 done | 504 done |
504 } | 505 } |
505 | 506 |
506 INPUTRC="$(dirname "$0")/inputrc.crosh" | 507 INPUTRC="$(dirname "$0")/inputrc.crosh" |
507 HISTFILE="$HOME/.crosh_history" | 508 HISTFILE="$HOME/.crosh_history" |
508 shell_history -r $HISTFILE | 509 shell_history -r $HISTFILE |
509 | 510 |
510 repl | 511 repl |
511 | 512 |
512 shell_history -w $HISTFILE | 513 shell_history -w $HISTFILE |
OLD | NEW |