From: ajacoutot Date: Fri, 12 Nov 2021 08:44:05 +0000 (+0000) Subject: Set SECONDS to 0 in _rc_wait. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8c16dc0a6be91f2117c7c9a1e713cca547586407;p=openbsd Set SECONDS to 0 in _rc_wait. While this is not strictly required, it's a failsafe and more fair to daemon_timeout as we will effectively wait for the start/stop/reload sequence instead of the duration of the rc.d script itself. --- diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr index 83827267f28..defac2d116e 100644 --- a/etc/rc.d/rc.subr +++ b/etc/rc.d/rc.subr @@ -1,4 +1,4 @@ -# $OpenBSD: rc.subr,v 1.147 2021/11/12 08:38:02 ajacoutot Exp $ +# $OpenBSD: rc.subr,v 1.148 2021/11/12 08:44:05 ajacoutot Exp $ # # Copyright (c) 2010, 2011, 2014-2021 Antoine Jacoutot # Copyright (c) 2010, 2011 Ingo Schwarze @@ -148,6 +148,8 @@ _rc_sendsig() { } _rc_wait() { + SECONDS=0 + if [ X"$1" = X"start" ]; then # prevent hanging the boot sequence trap "_rc_alarm" ALRM while (( SECONDS < daemon_timeout )); do