FreeBSD Bugzilla – Attachment 217979 Details for
Bug 249192
/etc/rc changes to support new rcorder -p option for parallel startup.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
/etc/rc supports rcorder -p for parallel startup.
rc.patch (text/plain), 2.09 KB, created by
unitrunker
on 2020-09-15 18:20:11 UTC
(
hide
)
Description:
/etc/rc supports rcorder -p for parallel startup.
Filename:
MIME Type:
Creator:
unitrunker
Created:
2020-09-15 18:20:11 UTC
Size:
2.09 KB
patch
obsolete
>--- head/libexec/rc/rc 2020-09-09 23:18:29.214369000 -0500 >+++ head/libexec/rc/rc 2020-09-09 23:32:55.507139000 -0500 >@@ -71,6 +71,12 @@ > . /etc/rc.subr > load_rc_config > >+# rc_parallel_start default is "NO" >+rc_parallel_start=${rc_parallel_start:-NO} >+_rc_parallel='' >+# enable rcorder -p if /etc/rc.conf rc_parallel_start is "YES" >+checkyesno rc_parallel_start && _rc_parallel='-p' >+ > # If we receive a SIGALRM, re-source /etc/rc.conf; this allows rc.d > # scripts to perform "boot-time configuration" including enabling and > # disabling rc.d scripts which appear later in the boot order. >@@ -92,16 +98,22 @@ > # Do a first pass to get everything up to $early_late_divider so that > # we can do a second pass that includes $local_startup directories > # >-files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* 2>/dev/null` >+files=`rcorder ${skip} ${skip_firstboot} ${_rc_parallel} /etc/rc.d/* 2>/dev/null` > > _rc_elem_done=' ' >-for _rc_elem in ${files}; do >- run_rc_script ${_rc_elem} ${_boot} >- _rc_elem_done="${_rc_elem_done}${_rc_elem} " >- >- case "$_rc_elem" in >- */${early_late_divider}) break ;; >- esac >+IFS=$'\n' >+for _rc_group in ${files}; do >+ IFS=$' ' >+ for _rc_elem in ${_rc_group}; do >+ run_rc_script ${_rc_elem} ${_boot} & >+ _rc_elem_done="${_rc_elem_done}${_rc_elem} " >+ >+ case "$_rc_elem" in >+ */${early_late_divider}) break ;; >+ esac >+ done >+ wait >+ IFS=$'\n' > done > > unset files local_rc >@@ -120,14 +132,21 @@ > skip_firstboot="" > fi > >-files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} 2>/dev/null` >-for _rc_elem in ${files}; do >- case "$_rc_elem_done" in >- *" $_rc_elem "*) continue ;; >- esac >- >- run_rc_script ${_rc_elem} ${_boot} >+files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} ${_rc_parallel} 2>/dev/null` >+IFS=$'\n' >+for _rc_group in ${files}; do >+ IFS=$' ' >+ for _rc_elem in ${_rc_group}; do >+ case "$_rc_elem_done" in >+ *" $_rc_elem "*) continue ;; >+ esac >+ >+ run_rc_script ${_rc_elem} ${_boot} & >+ done >+ wait >+ IFS=$'\n' > done >+unset IFS > > # Remove the firstboot sentinel, and reboot if it was requested. > # Be a bit paranoid about removing it to handle the common failure
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 249192
:
217835
|
217864
| 217979 |
222830
|
247078