summaryrefslogtreecommitdiff
path: root/etc/rc.d
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2017-06-05 15:24:58 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2017-06-05 15:24:58 +0000
commit6c03acddb28f4ecdd430733c8aac62334ce357b7 (patch)
tree23bcb93030b54d8cc0ab19c46151f29150908e55 /etc/rc.d
parentb769f463099361c1e1033730db63ad25c4de9b29 (diff)
Fix logic in _rc_wait to properly cope with setproctitle(3) daemons. It was a
regression from my recent rc.subr changes. reported by deraadt@ and naddy@ : pflogd was marked as failed during boot while it was properly running
Diffstat (limited to 'etc/rc.d')
-rw-r--r--etc/rc.d/rc.subr7
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/rc.d/rc.subr b/etc/rc.d/rc.subr
index e87f0b4b00c..b0317d135e1 100644
--- a/etc/rc.d/rc.subr
+++ b/etc/rc.d/rc.subr
@@ -1,4 +1,4 @@
-# $OpenBSD: rc.subr,v 1.125 2017/05/30 12:04:26 tb Exp $
+# $OpenBSD: rc.subr,v 1.126 2017/06/05 15:24:57 ajacoutot Exp $
#
# Copyright (c) 2010, 2011, 2014-2017 Antoine Jacoutot <ajacoutot@openbsd.org>
# Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -91,8 +91,9 @@ _rc_wait() {
if [ X"$1" = X"start" ]; then # prevent hanging the boot sequence
trap "_rc_alarm" ALRM
while [ $_i -lt ${daemon_timeout} ]; do
- _rc_do rc_check && [ X"${rc_bg}" = X"YES" ] && break ||
- [ -z "$$" ] && break
+ if _rc_do rc_check; then
+ [ X"${rc_bg}" = X"YES" ] || [ -z "$$" ] && break
+ fi
sleep 1
_i=$((_i+1))
done & wait