Attachment 'rc.patch'

Download

   1 --- head/libexec/rc/rc	2020-09-09 23:18:29.214369000 -0500
   2 +++ head/libexec/rc/rc	2020-09-09 23:32:55.507139000 -0500
   3 @@ -71,6 +71,12 @@
   4  . /etc/rc.subr
   5  load_rc_config
   6  
   7 +# rc_parallel_start default is "NO"
   8 +rc_parallel_start=${rc_parallel_start:-NO}
   9 +_rc_parallel=''
  10 +# enable rcorder -p if /etc/rc.conf rc_parallel_start is "YES"
  11 +checkyesno rc_parallel_start && _rc_parallel='-p'
  12 +
  13  # If we receive a SIGALRM, re-source /etc/rc.conf; this allows rc.d
  14  # scripts to perform "boot-time configuration" including enabling and
  15  # disabling rc.d scripts which appear later in the boot order.
  16 @@ -92,16 +98,22 @@
  17  # Do a first pass to get everything up to $early_late_divider so that
  18  # we can do a second pass that includes $local_startup directories
  19  #
  20 -files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* 2>/dev/null`
  21 +files=`rcorder ${skip} ${skip_firstboot} ${_rc_parallel} /etc/rc.d/* 2>/dev/null`
  22  
  23  _rc_elem_done=' '
  24 -for _rc_elem in ${files}; do
  25 -	run_rc_script ${_rc_elem} ${_boot}
  26 -	_rc_elem_done="${_rc_elem_done}${_rc_elem} "
  27 -
  28 -	case "$_rc_elem" in
  29 -	*/${early_late_divider})	break ;;
  30 -	esac
  31 +IFS=$'\n' 
  32 +for _rc_group in ${files}; do
  33 +	IFS=$' '
  34 +	for _rc_elem in ${_rc_group}; do
  35 +		run_rc_script ${_rc_elem} ${_boot} &
  36 +		_rc_elem_done="${_rc_elem_done}${_rc_elem} "
  37 +	
  38 +		case "$_rc_elem" in
  39 +		*/${early_late_divider})	break ;;
  40 +		esac
  41 +	done
  42 +	wait
  43 +	IFS=$'\n'
  44  done
  45  
  46  unset files local_rc
  47 @@ -120,14 +132,21 @@
  48  	skip_firstboot=""
  49  fi
  50  
  51 -files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} 2>/dev/null`
  52 -for _rc_elem in ${files}; do
  53 -	case "$_rc_elem_done" in
  54 -	*" $_rc_elem "*)	continue ;;
  55 -	esac
  56 -
  57 -	run_rc_script ${_rc_elem} ${_boot}
  58 +files=`rcorder ${skip} ${skip_firstboot} /etc/rc.d/* ${local_rc} ${_rc_parallel} 2>/dev/null`
  59 +IFS=$'\n' 
  60 +for _rc_group in ${files}; do
  61 +	IFS=$' '
  62 +	for _rc_elem in ${_rc_group}; do
  63 +		case "$_rc_elem_done" in
  64 +		*" $_rc_elem "*)	continue ;;
  65 +		esac
  66 +	
  67 +		run_rc_script ${_rc_elem} ${_boot} &
  68 +	done
  69 +	wait
  70 +	IFS=$'\n'
  71  done
  72 +unset IFS
  73  
  74  # Remove the firstboot sentinel, and reboot if it was requested.
  75  # Be a bit paranoid about removing it to handle the common failure

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2020-09-15T18:24:42+0000, 2.1 KB) [[attachment:rc.patch]]
  • [get | view] (2020-08-20T23:39:25+0000, 12.1 KB) [[attachment:rcorder.tgz]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.