diff options
author | Darren Tucker <dtucker@zip.com.au> | 2003-09-04 15:16:56 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2003-09-04 15:16:56 +1000 |
commit | 53c55f41798a7c386251f6922046b8d1f551a8f9 (patch) | |
tree | cc061f9ea7f2e868aa4eb96be58f1059b67c3296 /regress/test-exec.sh | |
parent | 58f89bc14db0475c52abff7376111269cc892af8 (diff) |
- [regress/agent.sh regress/proto-version.sh regress/ssh-com.sh
regress/test-exec.sh] Handle different was of echoing without newlines.
Diffstat (limited to 'regress/test-exec.sh')
-rw-r--r-- | regress/test-exec.sh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh index a7a8ddbe6..35f555b27 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh | |||
@@ -72,6 +72,17 @@ export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER | |||
72 | #echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER | 72 | #echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER |
73 | 73 | ||
74 | # helper | 74 | # helper |
75 | echon() | ||
76 | { | ||
77 | if [ "x`echo -n`" = "x" ]; then | ||
78 | echo -n "$@" | ||
79 | elif [ "x`echo '\c'`" = "x" ]; then | ||
80 | echo "$@\c" | ||
81 | else | ||
82 | fatal "Don't know how to echo without newline." | ||
83 | fi | ||
84 | } | ||
85 | |||
75 | cleanup () | 86 | cleanup () |
76 | { | 87 | { |
77 | if [ -f $PIDFILE ]; then | 88 | if [ -f $PIDFILE ]; then |
@@ -111,7 +122,7 @@ fail () | |||
111 | 122 | ||
112 | fatal () | 123 | fatal () |
113 | { | 124 | { |
114 | echo -n "FATAL: " | 125 | echon "FATAL: " |
115 | fail "$@" | 126 | fail "$@" |
116 | cleanup | 127 | cleanup |
117 | exit $RESULT | 128 | exit $RESULT |
@@ -169,7 +180,7 @@ for t in rsa rsa1; do | |||
169 | 180 | ||
170 | # known hosts file for client | 181 | # known hosts file for client |
171 | ( | 182 | ( |
172 | echo -n 'localhost-with-alias,127.0.0.1,::1 ' | 183 | echon 'localhost-with-alias,127.0.0.1,::1 ' |
173 | cat $OBJ/$t.pub | 184 | cat $OBJ/$t.pub |
174 | ) >> $OBJ/known_hosts | 185 | ) >> $OBJ/known_hosts |
175 | 186 | ||