Browse Source

Ok turns out we still want to keep the rc_bg variable around but we need

to know which daemon cannot background themselves (actually we want to
know the opposite, but there are much more). However, it's only needed in
_rc_wait and rc.subr still does its magic without the need to add `&'.
OPENBSD_6_2
ajacoutot 7 years ago
parent
commit
6f1669a9a1
2 changed files with 5 additions and 3 deletions
  1. +3
    -2
      src/etc/rc.d/rc.subr
  2. +2
    -1
      src/etc/rc.d/ypbind

+ 3
- 2
src/etc/rc.d/rc.subr View File

@ -1,4 +1,4 @@
# $OpenBSD: rc.subr,v 1.119 2017/05/27 13:51:52 ajacoutot Exp $
# $OpenBSD: rc.subr,v 1.120 2017/05/27 19:55:48 ajacoutot Exp $
#
# Copyright (c) 2010, 2011, 2014-2017 Antoine Jacoutot <ajacoutot@openbsd.org>
# Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
@ -91,7 +91,8 @@ _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 && break
_rc_do rc_check && [ X"${rc_bg}" = X"YES" ] && break ||
[ -z "$$" ] && break
sleep 1
_i=$((_i+1))
done & wait


+ 2
- 1
src/etc/rc.d/ypbind View File

@ -1,11 +1,12 @@
#!/bin/sh
#
# $OpenBSD: ypbind,v 1.6 2017/05/27 13:51:52 ajacoutot Exp $
# $OpenBSD: ypbind,v 1.7 2017/05/27 19:55:48 ajacoutot Exp $
daemon="/usr/sbin/ypbind"
. /etc/rc.d/rc.subr
rc_bg=YES
rc_reload=NO
rc_pre() {


Loading…
Cancel
Save