|
Lines 71-76
Link Here
|
| 71 |
. /etc/rc.subr |
71 |
. /etc/rc.subr |
| 72 |
load_rc_config |
72 |
load_rc_config |
| 73 |
|
73 |
|
|
|
74 |
# rc_parallel_start default is "NO" |
| 75 |
rc_parallel_start=${rc_parallel_start:-NO} |
| 76 |
_rc_parallel='' |
| 77 |
# enable rcorder -p if /etc/rc.conf rc_parallel_start is "YES" |
| 78 |
checkyesno rc_parallel_start && _rc_parallel='-p' |
| 79 |
|
| 74 |
# If we receive a SIGALRM, re-source /etc/rc.conf; this allows rc.d |
80 |
# If we receive a SIGALRM, re-source /etc/rc.conf; this allows rc.d |
| 75 |
# scripts to perform "boot-time configuration" including enabling and |
81 |
# scripts to perform "boot-time configuration" including enabling and |
| 76 |
# disabling rc.d scripts which appear later in the boot order. |
82 |
# disabling rc.d scripts which appear later in the boot order. |
|
Lines 92-107
Link Here
|
| 92 |
# Do a first pass to get everything up to $early_late_divider so that |
98 |
# Do a first pass to get everything up to $early_late_divider so that |
| 93 |
# we can do a second pass that includes $local_startup directories |
99 |
# we can do a second pass that includes $local_startup directories |
| 94 |
# |
100 |
# |
| 95 |
files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* 2>/dev/null` |
101 |
files=`rcorder ${skip} ${skip_firstboot} ${_rc_parallel} /etc/rc.d/* 2>/dev/null` |
| 96 |
|
102 |
|
| 97 |
_rc_elem_done=' ' |
103 |
_rc_elem_done=' ' |
| 98 |
for _rc_elem in ${files}; do |
104 |
IFS=$'\n' |
| 99 |
run_rc_script ${_rc_elem} ${_boot} |
105 |
for _rc_group in ${files}; do |
| 100 |
_rc_elem_done="${_rc_elem_done}${_rc_elem} " |
106 |
IFS=$' ' |
| 101 |
|
107 |
for _rc_elem in ${_rc_group}; do |
| 102 |
case "$_rc_elem" in |
108 |
run_rc_script ${_rc_elem} ${_boot} |
| 103 |
*/${early_late_divider}) break ;; |
109 |
_rc_elem_done="${_rc_elem_done}${_rc_elem} " |
| 104 |
esac |
110 |
|
|
|
111 |
case "$_rc_elem" in |
| 112 |
*/${early_late_divider}) break ;; |
| 113 |
esac |
| 114 |
done |
| 115 |
wait |
| 116 |
IFS=$'\n' |
| 105 |
done |
117 |
done |
| 106 |
|
118 |
|
| 107 |
unset files local_rc |
119 |
unset files local_rc |
|
Lines 120-133
Link Here
|
| 120 |
skip_firstboot="" |
132 |
skip_firstboot="" |
| 121 |
fi |
133 |
fi |
| 122 |
|
134 |
|
| 123 |
files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} 2>/dev/null` |
135 |
files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} ${_rc_parallel} 2>/dev/null` |
| 124 |
for _rc_elem in ${files}; do |
136 |
IFS=$'\n' |
| 125 |
case "$_rc_elem_done" in |
137 |
for _rc_group in ${files}; do |
| 126 |
*" $_rc_elem "*) continue ;; |
138 |
IFS=$' ' |
| 127 |
esac |
139 |
for _rc_elem in ${_rc_group}; do |
| 128 |
|
140 |
case "$_rc_elem_done" in |
| 129 |
run_rc_script ${_rc_elem} ${_boot} |
141 |
*" $_rc_elem "*) continue ;; |
|
|
142 |
esac |
| 143 |
|
| 144 |
run_rc_script ${_rc_elem} ${_boot} |
| 145 |
done |
| 146 |
wait |
| 147 |
IFS=$'\n' |
| 130 |
done |
148 |
done |
|
|
149 |
unset IFS |
| 131 |
|
150 |
|
| 132 |
# Remove the firstboot sentinel, and reboot if it was requested. |
151 |
# Remove the firstboot sentinel, and reboot if it was requested. |
| 133 |
# Be a bit paranoid about removing it to handle the common failure |
152 |
# Be a bit paranoid about removing it to handle the common failure |