| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 fi | 179 fi |
| 180 | 180 |
| 181 if [ ! -z "$port" ]; then | 181 if [ ! -z "$port" ]; then |
| 182 if ! check_digits "$port"; then | 182 if ! check_digits "$port"; then |
| 183 echo "Invalid port: $port" | 183 echo "Invalid port: $port" |
| 184 return | 184 return |
| 185 fi | 185 fi |
| 186 fi | 186 fi |
| 187 | 187 |
| 188 echo "open: host: $host, user: $user, port: $port" | 188 echo "open: host: $host, user: $user, port: $port" |
| 189 ssh -F /etc/ssh/ssh_config -p "$port" "$user@$host" | 189 ssh -e none -F /etc/ssh/ssh_config -p "$port" "$user@$host" |
| 190 } | 190 } |
| 191 | 191 |
| 192 cmd_ssh_forget_host() { | 192 cmd_ssh_forget_host() { |
| 193 local known_hosts="$(readlink -f $HOME/.ssh/known_hosts)" | 193 local known_hosts="$(readlink -f $HOME/.ssh/known_hosts)" |
| 194 | 194 |
| 195 # Test that the known_hosts is a regular file and is not 0 length. | 195 # Test that the known_hosts is a regular file and is not 0 length. |
| 196 if [ ! -f "$known_hosts" -o ! -s "$known_hosts" ]; then | 196 if [ ! -f "$known_hosts" -o ! -s "$known_hosts" ]; then |
| 197 echo "No known hosts." | 197 echo "No known hosts." |
| 198 return | 198 return |
| 199 fi | 199 fi |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 done | 484 done |
| 485 } | 485 } |
| 486 | 486 |
| 487 INPUTRC="$(dirname "$0")/inputrc.crosh" | 487 INPUTRC="$(dirname "$0")/inputrc.crosh" |
| 488 HISTFILE="$HOME/.crosh_history" | 488 HISTFILE="$HOME/.crosh_history" |
| 489 shell_history -r $HISTFILE | 489 shell_history -r $HISTFILE |
| 490 | 490 |
| 491 repl | 491 repl |
| 492 | 492 |
| 493 shell_history -w $HISTFILE | 493 shell_history -w $HISTFILE |
| OLD | NEW |