Date: Fri, 29 Apr 2011 21:10:41 +0000 (UTC) From: Doug Barton <dougb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r221227 - head/etc Message-ID: <201104292110.p3TLAfp4015734@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dougb Date: Fri Apr 29 21:10:41 2011 New Revision: 221227 URL: http://svn.freebsd.org/changeset/base/221227 Log: Rather than trusting that nothing is going to sneak in before the early_late_divider in the second run (and thus be skipped altogether), keep a list of the scripts run early, and use that list to skip things in the second run. This has the primary benefit of not skipping a local script that gets ordered too early in the second run. It also gives an opportunity to clean up/simplify the code a bit. Use a space-separated list rather than the more traditional colon for maximum insurance against creativity in local naming conventions. Reviewed by: brooks Modified: head/etc/rc Modified: head/etc/rc ============================================================================== --- head/etc/rc Fri Apr 29 21:09:03 2011 (r221226) +++ head/etc/rc Fri Apr 29 21:10:41 2011 (r221227) @@ -84,8 +84,10 @@ fi # files=`rcorder ${skip} /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 ;; @@ -103,14 +105,9 @@ case ${local_startup} in esac files=`rcorder ${skip} /etc/rc.d/* ${local_rc} 2>/dev/null` -_skip_early=1 for _rc_elem in ${files}; do - case "$_skip_early" in - 1) case "$_rc_elem" in - */${early_late_divider}) _skip_early=0 ;; - esac - continue - ;; + case "$_rc_elem_done" in + *" $_rc_elem "*) continue ;; esac run_rc_script ${_rc_elem} ${_boot}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104292110.p3TLAfp4015734>