diff options
author | Darren Tucker <dtucker@zip.com.au> | 2013-05-17 13:28:36 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2013-05-17 13:28:36 +1000 |
commit | 56347efe796a0506e846621ae65562b978e45f1d (patch) | |
tree | 0202d8efec2ba2bd1904f445f4c009ea8a05a091 /regress/test-exec.sh | |
parent | 91af05c5167fe0aa5bd41d2e4a83757d9f627c18 (diff) |
- dtucker@cvs.openbsd.org 2013/05/17 00:37:40
[regress/agent.sh regress/keytype.sh regress/cfgmatch.sh
regress/forcecommand.sh regress/proto-version.sh regress/test-exec.sh
regress/cipher-speed.sh regress/cert-hostkey.sh regress/cert-userkey.sh
regress/ssh-com.sh]
replace 'echo -n' with 'printf' since it's more portable
also remove "echon" hack.
Diffstat (limited to 'regress/test-exec.sh')
-rw-r--r-- | regress/test-exec.sh | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh index f797ab68d..0680eaa94 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: test-exec.sh,v 1.40 2013/04/07 02:16:03 dtucker Exp $ | 1 | # $OpenBSD: test-exec.sh,v 1.41 2013/05/17 00:37:40 dtucker Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | #SUDO=sudo | 4 | #SUDO=sudo |
@@ -172,18 +172,6 @@ SSH="$SSHLOGWRAP" | |||
172 | export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER SCP | 172 | export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER SCP |
173 | #echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER $SCP | 173 | #echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER $SCP |
174 | 174 | ||
175 | # helper | ||
176 | echon() | ||
177 | { | ||
178 | if [ "x`echo -n`" = "x" ]; then | ||
179 | echo -n "$@" | ||
180 | elif [ "x`echo '\c'`" = "x" ]; then | ||
181 | echo "$@\c" | ||
182 | else | ||
183 | fatal "Don't know how to echo without newline." | ||
184 | fi | ||
185 | } | ||
186 | |||
187 | have_prog() | 175 | have_prog() |
188 | { | 176 | { |
189 | saved_IFS="$IFS" | 177 | saved_IFS="$IFS" |
@@ -273,7 +261,7 @@ fail () | |||
273 | fatal () | 261 | fatal () |
274 | { | 262 | { |
275 | save_debug_log "FATAL: $@" | 263 | save_debug_log "FATAL: $@" |
276 | echo -n "FATAL: " | 264 | printf "FATAL: " |
277 | fail "$@" | 265 | fail "$@" |
278 | cleanup | 266 | cleanup |
279 | exit $RESULT | 267 | exit $RESULT |
@@ -360,7 +348,7 @@ for t in rsa rsa1; do | |||
360 | 348 | ||
361 | # known hosts file for client | 349 | # known hosts file for client |
362 | ( | 350 | ( |
363 | echon 'localhost-with-alias,127.0.0.1,::1 ' | 351 | printf 'localhost-with-alias,127.0.0.1,::1 ' |
364 | cat $OBJ/$t.pub | 352 | cat $OBJ/$t.pub |
365 | ) >> $OBJ/known_hosts | 353 | ) >> $OBJ/known_hosts |
366 | 354 | ||