From: djm Date: Tue, 11 Jun 2024 01:58:27 +0000 (+0000) Subject: fix PIDFILE handling, broken for SUDO=doas in last commit here X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=57de51f9f581868d28dded4fc7ac63ec7b7af2e7;p=openbsd fix PIDFILE handling, broken for SUDO=doas in last commit here --- diff --git a/regress/usr.bin/ssh/test-exec.sh b/regress/usr.bin/ssh/test-exec.sh index fcf9164147a..7adf0889a03 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.114 2024/06/06 19:48:40 djm Exp $ +# $OpenBSD: test-exec.sh,v 1.115 2024/06/11 01:58:27 djm Exp $ # Placed in the Public Domain. #SUDO=sudo @@ -265,6 +265,7 @@ export SSH_PKCS11_HELPER SSH_SK_HELPER stop_sshd () { + [ -z $PIDFILE ] && return [ -f $PIDFILE ] || return pid=`$SUDO cat $PIDFILE` if [ "X$pid" = "X" ]; then @@ -675,6 +676,7 @@ chmod a+x $OBJ/ssh_proxy.sh start_sshd () { + PIDFILE=$OBJ/pidfile # start sshd logfile="${TEST_SSH_LOGDIR}/sshd.`$OBJ/timestamp`.$$.log" $SUDO ${SSHD} -f $OBJ/sshd_config "$@" -t || fatal "sshd_config broken"