summaryrefslogtreecommitdiffstats
path: root/etc/rc.subr
diff options
context:
space:
mode:
Diffstat (limited to 'etc/rc.subr')
-rw-r--r--etc/rc.subr11
1 files changed, 7 insertions, 4 deletions
diff --git a/etc/rc.subr b/etc/rc.subr
index 0c28f2d..397af1d 100644
--- a/etc/rc.subr
+++ b/etc/rc.subr
@@ -355,6 +355,8 @@ _find_processes()
#
wait_for_pids()
{
+ local _list _prefix _nlist _j
+
_list="$@"
if [ -z "$_list" ]; then
return
@@ -365,6 +367,7 @@ wait_for_pids()
for _j in $_list; do
if kill -0 $_j 2>/dev/null; then
_nlist="${_nlist}${_nlist:+ }$_j"
+ [ -n "$_prefix" ] && sleep 1
fi
done
if [ -z "$_nlist" ]; then
@@ -373,7 +376,7 @@ wait_for_pids()
_list=$_nlist
echo -n ${_prefix:-"Waiting for PIDS: "}$_list
_prefix=", "
- pwait $_list 2>/dev/null || sleep 2
+ pwait $_list 2>/dev/null
done
if [ -n "$_prefix" ]; then
echo "."
@@ -643,12 +646,12 @@ run_rc_command()
if [ "$_elem" != "$rc_arg" ]; then
continue
fi
- # if ${rcvar} is set, and $1 is not
- # "rcvar", then run
+ # if ${rcvar} is set, $1 is not "rcvar"
+ # and ${rc_pid} is not set, then run
# checkyesno ${rcvar}
# and return if that failed
#
- if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" ]; then
+ if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a -z "${rc_pid}" ]; then
if ! checkyesno ${rcvar}; then
if [ -n "${rc_quiet}" ]; then
return 0
OpenPOWER on IntegriCloud