summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2021-06-02 00:17:46 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2021-06-02 00:17:46 +0000
commitdb8f57b96094d9fc4e79f3128395c184d1dc23ff (patch)
tree078c262310ccf576741650fe36dfeb810c615597 /regress/usr.bin
parentd4d3a827aaebaa95656a1e2acc243fd867fab455 (diff)
Merge back shell portability changes bringing it back in sync with
-portable.
Diffstat (limited to 'regress/usr.bin')
-rwxr-xr-xregress/usr.bin/ssh/ssh2putty.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/regress/usr.bin/ssh/ssh2putty.sh b/regress/usr.bin/ssh/ssh2putty.sh
index 5b2d79546b0..7fcb3f0bfce 100755
--- a/regress/usr.bin/ssh/ssh2putty.sh
+++ b/regress/usr.bin/ssh/ssh2putty.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: ssh2putty.sh,v 1.7 2021/06/01 23:56:20 dtucker Exp $
+# $OpenBSD: ssh2putty.sh,v 1.8 2021/06/02 00:17:45 dtucker Exp $
if test "x$1" = "x" -o "x$2" = "x" -o "x$3" = "x" ; then
echo "Usage: ssh2putty hostname port ssh-private-key"
@@ -13,7 +13,9 @@ KEYFILE=$3
OPENSSL="${OPENSSL:-openssl}"
# XXX - support DSA keys too
-if ! grep -q "BEGIN RSA PRIVATE KEY" $KEYFILE ; then
+if grep "BEGIN RSA PRIVATE KEY" $KEYFILE >/dev/null 2>&1 ; then
+ :
+else
echo "Unsupported private key format"
exit 1
fi