]> andersk Git - openssh.git/blobdiff - regress/dynamic-forward.sh
- dtucker@cvs.openbsd.org 2005/12/14 04:36:39
[openssh.git] / regress / dynamic-forward.sh
index 0f175b2d9bf2a1f6282c539c63e28c6d0ab6a1a5..4674a7bafebe7058b6d8d98fd34c40ce69e01986 100644 (file)
@@ -1,15 +1,15 @@
-#      $OpenBSD: dynamic-forward.sh,v 1.2 2003/07/03 08:21:46 markus Exp $
+#      $OpenBSD: dynamic-forward.sh,v 1.4 2004/06/22 22:55:56 dtucker Exp $
 #      Placed in the Public Domain.
 
 tid="dynamic forwarding"
 
-PORT=4242
-FWDPORT=4243
+FWDPORT=`expr $PORT + 1`
+
 DATA=/bin/ls${EXEEXT}
 
-if [ -x "`which nc 2>&1`" ] && nc -h 2>&1 | grep "x proxy address" >/dev/null; then
+if have_prog nc && nc -h 2>&1 | grep "proxy address" >/dev/null; then
        proxycmd="nc -x 127.0.0.1:$FWDPORT -X"
-elif [ -x "`which connect 2>&1`" ]; then
+elif have_prog connect; then
        proxycmd="connect -S 127.0.0.1:$FWDPORT -"
 else
        echo "skipped (no suitable ProxyCommand found)"
@@ -44,4 +44,7 @@ for p in 1 2; do
        else
                fail "no pid file: $OBJ/remote_pid"
        fi
+
+       # Must allow time for connection tear-down
+       sleep 2
 done
This page took 0.050521 seconds and 4 git commands to generate.