chiark / gitweb /
Merge remote-tracking branch 'crybaby'
authorMark Wooding <mdw@distorted.org.uk>
Fri, 16 Sep 2011 10:56:41 +0000 (11:56 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 16 Sep 2011 10:56:41 +0000 (11:56 +0100)
* crybaby:
  hacks/ssh: Pass the requested port to `ssh -Ocheck'.

hacks/ssh

index 16b75782352fb6e694e46da4d1c4b025d86871b8..18f39ac0b18a6f94aa9cf42c398609594dcc751f 100755 (executable)
--- a/hacks/ssh
+++ b/hacks/ssh
@@ -173,7 +173,9 @@ case "$mode" in
   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