]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Skip scp3 test if there's no scp on remote path.
authorDarren Tucker <dtucker@dtucker.net>
Sat, 23 Jul 2022 04:36:38 +0000 (14:36 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Sat, 23 Jul 2022 04:36:38 +0000 (14:36 +1000)
scp -3 ends up using the scp that's in the remote path and will fail if
one is not available.  Based on a patch from rapier at psc.edu.

regress/scp3.sh

index f71b1567755b7da6f8278fefc8fbe9c8ac6ad0d8..47db47cd6a7d6055cd4d612acd62dced58ad7bd6 100644 (file)
@@ -9,6 +9,12 @@ COPY2=${OBJ}/copy2
 DIR=${COPY}.dd
 DIR2=${COPY}.dd2
 
+$SSH -F $OBJ/ssh_proxy somehost \
+    'IFS=":"; for i in $PATH;do [ -x "$i/scp" ] && exit 0; done; exit 1'
+if [ $? -eq 1 ]; then
+       skip "No scp on remote path."
+fi
+
 SRC=`dirname ${SCRIPT}`
 cp ${SRC}/scp-ssh-wrapper.sh ${OBJ}/scp-ssh-wrapper.scp
 chmod 755 ${OBJ}/scp-ssh-wrapper.scp