summaryrefslogtreecommitdiff
path: root/regress/keygen-knownhosts.sh
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2015-01-27 12:01:36 +0000
committerDamien Miller <djm@mindrot.org>2015-01-27 23:03:15 +1100
commite56aa87502f22c5844918c10190e8b4f785f067b (patch)
treee541b223447a68e0132079ee39fe243877ec11fc /regress/keygen-knownhosts.sh
parent9f7637f56eddfaf62ce3c0af89c25480f2cf1068 (diff)
upstream commit
use printf instead of echo -n to reduce diff against -portable
Diffstat (limited to 'regress/keygen-knownhosts.sh')
-rw-r--r--regress/keygen-knownhosts.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/regress/keygen-knownhosts.sh b/regress/keygen-knownhosts.sh
index 35a5ea499..085aac650 100644
--- a/regress/keygen-knownhosts.sh
+++ b/regress/keygen-knownhosts.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: keygen-knownhosts.sh,v 1.1 2015/01/18 22:00:18 djm Exp $ 1# $OpenBSD: keygen-knownhosts.sh,v 1.2 2015/01/27 12:01:36 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="ssh-keygen known_hosts" 4tid="ssh-keygen known_hosts"
@@ -13,13 +13,13 @@ for x in host-a host-b host-c host-d host-e host-f host-a2 host-b2; do
13 echo "# $x" >> $OBJ/kh.hosts 13 echo "# $x" >> $OBJ/kh.hosts
14 ( 14 (
15 case "$x" in 15 case "$x" in
16 host-a|host-b) echo -n "$x " ;; 16 host-a|host-b) printf "$x " ;;
17 host-c) echo -n "@cert-authority $x " ;; 17 host-c) printf "@cert-authority $x " ;;
18 host-d) echo -n "@revoked $x " ;; 18 host-d) printf "@revoked $x " ;;
19 host-e) echo -n "host-e* " ;; 19 host-e) printf "host-e* " ;;
20 host-f) echo -n "host-f,host-g,host-h " ;; 20 host-f) printf "host-f,host-g,host-h " ;;
21 host-a2) echo -n "host-a " ;; 21 host-a2) printf "host-a " ;;
22 host-b2) echo -n "host-b " ;; 22 host-b2) printf "host-b " ;;
23 esac 23 esac
24 cat $OBJ/kh.${x}.pub 24 cat $OBJ/kh.${x}.pub
25 # Blank line should be preserved. 25 # Blank line should be preserved.
@@ -47,7 +47,7 @@ expect_key() {
47 test "x$_mark" = "xREVOKED" && _marker="@revoked " 47 test "x$_mark" = "xREVOKED" && _marker="@revoked "
48 test "x$_line" != "x" && 48 test "x$_line" != "x" &&
49 echo "# Host $_host found: line $_line $_mark" >> $OBJ/kh.expect 49 echo "# Host $_host found: line $_line $_mark" >> $OBJ/kh.expect
50 echo -n "${_marker}$_hosts " >> $OBJ/kh.expect 50 printf "${_marker}$_hosts " >> $OBJ/kh.expect
51 cat $OBJ/kh.${_key}.pub >> $OBJ/kh.expect || 51 cat $OBJ/kh.${_key}.pub >> $OBJ/kh.expect ||
52 fatal "${_key}.pub missing" 52 fatal "${_key}.pub missing"
53} 53}