From: dtucker Date: Wed, 2 Jun 2021 00:17:45 +0000 (+0000) Subject: Merge back shell portability changes bringing it back in sync with X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4ea1a6ca48667a182d49738f98006dbd55d2f1ae;p=openbsd Merge back shell portability changes bringing it back in sync with -portable. --- 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