FreeBSD Bugzilla – Attachment 247078 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]
parallel startup /etc/rc
patch-rc (text/plain), 2.76 KB, created by
Ken DEGUCHI
on 2023-12-16 05:16:49 UTC
(
hide
)
Description:
parallel startup /etc/rc
Filename:
MIME Type:
Creator:
Ken DEGUCHI
Created:
2023-12-16 05:16:49 UTC
Size:
2.76 KB
patch
obsolete
>diff --git a/libexec/rc/rc b/libexec/rc/rc >index 462967703d60..fd54aaab53f6 100644 >--- a/libexec/rc/rc >+++ b/libexec/rc/rc >@@ -72,6 +72,12 @@ fi > . /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. >@@ -93,21 +99,26 @@ fi > # 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 > # >-unset system_rc >-find_system_scripts >-files=`rcorder ${skip} ${skip_firstboot} ${system_rc} 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 >+oldifs="$IFS" >+IFS=$'\n' >+for _rc_group in ${files}; do >+ IFS="$oldifs" >+ 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 2 ;; >+ esac >+ done >+ wait >+ IFS=$'\n' > done >+IFS="$oldifs" > >-unset files local_rc system_rc >+unset files local_rc > > # Now that disks are mounted, for each dir in $local_startup > # search for init scripts that use the new rc.d semantics. >@@ -123,15 +134,20 @@ if [ -e ${firstboot_sentinel} ]; then > skip_firstboot="" > fi > >-find_system_scripts >-files=`rcorder ${skip} ${skip_firstboot} ${system_rc} ${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="$oldifs" >+ 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 >+IFS="$oldifs" > > # Remove the firstboot sentinel, and reboot if it was requested. > # Be a bit paranoid about removing it to handle the common failure >@@ -139,7 +155,7 @@ done > # Note: this assumes firstboot_sentinel is on / when we have > # a read-only /, or that it is on media that's writable. > if [ -e ${firstboot_sentinel} ]; then >- checkyesno root_rw_mount || mount -uw / >+ checkyesno root_rw_mount && mount -uw / > chflags -R 0 ${firstboot_sentinel} > rm -rf ${firstboot_sentinel} > if [ -e ${firstboot_sentinel}-reboot ]; then
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