upstream: adapt to scp -M flag change; make scp3.sh test SFTP mode too
OpenBSD-Regress-ID: 43fea26704a0f0b962b53c1fabcb68179638f9c0
This commit is contained in:
parent
391ca67fb9
commit
931f592f26
|
@ -1,4 +1,4 @@
|
||||||
# $OpenBSD: scp-uri.sh,v 1.3 2021/08/03 01:05:24 djm Exp $
|
# $OpenBSD: scp-uri.sh,v 1.4 2021/08/10 03:35:45 djm Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
tid="scp-uri"
|
tid="scp-uri"
|
||||||
|
@ -24,12 +24,11 @@ cp $OBJ/ssh_config $OBJ/ssh_config.orig
|
||||||
egrep -v '^ +(Port|User) +.*$' $OBJ/ssh_config.orig > $OBJ/ssh_config
|
egrep -v '^ +(Port|User) +.*$' $OBJ/ssh_config.orig > $OBJ/ssh_config
|
||||||
|
|
||||||
for mode in scp sftp ; do
|
for mode in scp sftp ; do
|
||||||
|
tag="$tid: $mode mode"
|
||||||
if test $mode = scp ; then
|
if test $mode = scp ; then
|
||||||
scpopts="-M scp -q -S ${OBJ}/scp-ssh-wrapper.scp"
|
scpopts="-O -q -S ${OBJ}/scp-ssh-wrapper.scp"
|
||||||
tag="$tid"
|
|
||||||
else
|
else
|
||||||
scpopts="-M sftp -D ${SFTPSERVER}"
|
scpopts="-s -D ${SFTPSERVER}"
|
||||||
tag="$tid: sftp mode"
|
|
||||||
fi
|
fi
|
||||||
verbose "$tag: simple copy local file to remote file"
|
verbose "$tag: simple copy local file to remote file"
|
||||||
scpclean
|
scpclean
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $OpenBSD: scp.sh,v 1.12 2021/08/03 01:05:24 djm Exp $
|
# $OpenBSD: scp.sh,v 1.13 2021/08/10 03:35:45 djm Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
tid="scp"
|
tid="scp"
|
||||||
|
@ -28,12 +28,11 @@ scpclean() {
|
||||||
}
|
}
|
||||||
|
|
||||||
for mode in scp sftp ; do
|
for mode in scp sftp ; do
|
||||||
|
tag="$tid: $mode mode"
|
||||||
if test $mode = scp ; then
|
if test $mode = scp ; then
|
||||||
scpopts="-M scp -q -S ${OBJ}/scp-ssh-wrapper.scp"
|
scpopts="-O -q -S ${OBJ}/scp-ssh-wrapper.scp"
|
||||||
tag="$tid"
|
|
||||||
else
|
else
|
||||||
scpopts="-M sftp -D ${SFTPSERVER}"
|
scpopts="-s -D ${SFTPSERVER}"
|
||||||
tag="$tid: sftp mode"
|
|
||||||
fi
|
fi
|
||||||
verbose "tid: simple copy local file to local file"
|
verbose "tid: simple copy local file to local file"
|
||||||
scpclean
|
scpclean
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $OpenBSD: scp3.sh,v 1.2 2021/08/06 09:00:18 dtucker Exp $
|
# $OpenBSD: scp3.sh,v 1.3 2021/08/10 03:35:45 djm Exp $
|
||||||
# Placed in the Public Domain.
|
# Placed in the Public Domain.
|
||||||
|
|
||||||
tid="scp3"
|
tid="scp3"
|
||||||
|
@ -20,13 +20,14 @@ scpclean() {
|
||||||
chmod 755 ${DIR} ${DIR2}
|
chmod 755 ${DIR} ${DIR2}
|
||||||
}
|
}
|
||||||
|
|
||||||
# XXX sftp too once it's ready
|
for mode in scp sftp ; do
|
||||||
for mode in scp ; do
|
|
||||||
scpopts="-F${OBJ}/ssh_proxy -S ${SSH} -q"
|
scpopts="-F${OBJ}/ssh_proxy -S ${SSH} -q"
|
||||||
tag="$tid: $mode mode"
|
tag="$tid: $mode mode"
|
||||||
# if test $mode = scp ; then
|
if test $mode = scp ; then
|
||||||
# scpopts="$scpopts -O"
|
scpopts="$scpopts -O"
|
||||||
# fi
|
else
|
||||||
|
scpopts="-s -D ${SFTPSERVER}"
|
||||||
|
fi
|
||||||
|
|
||||||
verbose "$tag: simple copy remote file to remote file"
|
verbose "$tag: simple copy remote file to remote file"
|
||||||
scpclean
|
scpclean
|
||||||
|
|
Loading…
Reference in New Issue