~mdw
/
profile
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hacks/ssh: Fix stupid behaviour when hostname is `t'.
[profile]
/
hacks
/
ssh
diff --git
a/hacks/ssh
b/hacks/ssh
index
16b7578
..
64df966
100755
(executable)
--- a/
hacks/ssh
+++ b/
hacks/ssh
@@
-146,7
+146,7
@@
while :; do
## A bare word. Maybe it's the hostname, or the start of the command.
*)
## A bare word. Maybe it's the hostname, or the start of the command.
*)
- case ${host-t} in
+ case ${host-t}
${host+nil}
in
t) host=$1 ;;
*) break ;;
esac
t) host=$1 ;;
*) break ;;
esac
@@
-173,7
+173,10
@@
case "$mode" in
m)
mkdir -p -m700 "$SSH_LOGDIR"
logfile=$SSH_LOGDIR/${login+"$login@"}"$host"${port+":$port"}.log
m)
mkdir -p -m700 "$SSH_LOGDIR"
logfile=$SSH_LOGDIR/${login+"$login@"}"$host"${port+":$port"}.log
- if ! "$REAL_SSH" -Ocheck ${login+"$login@"}"$host" >/dev/null 2>&1; then
+ if ! "$REAL_SSH" -Ocheck \
+ ${port+-p$port} ${login+"$login@"}"$host" \
+ >/dev/null 2>&1
+ then
"$REAL_SSH" -MNf "${masteropts[@]}" "$host" \
</dev/null >/dev/null 2>$logfile
fi
"$REAL_SSH" -MNf "${masteropts[@]}" "$host" \
</dev/null >/dev/null 2>$logfile
fi