diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2023-03-01 21:54:51 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2023-03-01 21:54:51 +0000 |
commit | 02536f24fd25ed47012424d97005785b4e3733e8 (patch) | |
tree | eab7e6743830261d8d5c2c8f483899ae3bdf4c69 /regress/usr.bin | |
parent | 6c3be6be7f67400d4447ee553d7cdf9189041595 (diff) |
Remove old log symlinks before creating new ones. In -portable some
platforms don't like overwriting existing symlinks.
Diffstat (limited to 'regress/usr.bin')
-rw-r--r-- | regress/usr.bin/ssh/test-exec.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/regress/usr.bin/ssh/test-exec.sh b/regress/usr.bin/ssh/test-exec.sh index 8567b08f5c2..0a8957d5429 100644 --- a/regress/usr.bin/ssh/test-exec.sh +++ b/regress/usr.bin/ssh/test-exec.sh @@ -1,4 +1,4 @@ -# $OpenBSD: test-exec.sh,v 1.95 2023/03/01 09:29:32 dtucker Exp $ +# $OpenBSD: test-exec.sh,v 1.96 2023/03/01 21:54:50 dtucker Exp $ # Placed in the Public Domain. #SUDO=sudo @@ -184,7 +184,8 @@ logfile="${TEST_SSH_LOGDIR}/\${timestamp}.ssh.\$\$.log" echo "Executing: ${SSH} \$@" log \${logfile} >>$TEST_REGRESS_LOGFILE echo "Executing: ${SSH} \$@" >>\${logfile} for i in "\$@";do shift;case "\$i" in -q):;; *) set -- "\$@" "\$i";;esac;done -ln -f -s \${logfile} $TEST_SSH_LOGFILE +rm -f $TEST_SSH_LOGFILE +ln -s \${logfile} $TEST_SSH_LOGFILE exec ${SSH} -E\${logfile} "\$@" EOD @@ -198,7 +199,8 @@ cat >$SSHDLOGWRAP <<EOD #!/bin/sh timestamp="\`$OBJ/timestamp\`" logfile="${TEST_SSH_LOGDIR}/\${timestamp}.sshd.\$\$.log" -ln -f -s \${logfile} $TEST_SSHD_LOGFILE +rm -f $TEST_SSH_LOGFILE +ln -s \${logfile} $TEST_SSH_LOGFILE echo "Executing: ${SSHD} \$@" log \${logfile} >>$TEST_REGRESS_LOGFILE echo "Executing: ${SSHD} \$@" >>\${logfile} exec ${SSHD} -E\${logfile} "\$@" |