summaryrefslogtreecommitdiff
path: root/etc/rc.d
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2021-11-12 08:44:06 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2021-11-12 08:44:06 +0000
commitb2223d542164bbc3b8905ce1ceaa605c0272e58e (patch)
tree7e4455941fc6f383052c78205e0e81ed78e47a14 /etc/rc.d
parentaaffbc170f2b659d64f370f976d6a4648682d4c9 (diff)
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.
Diffstat (limited to 'etc/rc.d')
-rw-r--r--etc/rc.d/rc.subr4
1 files changed, 3 insertions, 1 deletions
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 <ajacoutot@openbsd.org>
# Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -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