Date: Thu, 08 Dec 2005 13:53:46 -0800 From: Doug Barton <dougb@FreeBSD.org> To: freebsd-rc@FreeBSD.org Subject: For Review: Latest update to rcorder patch Message-ID: <4398AB6A.3000209@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------020801090309070505050802 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Howdy, The attached patch contains what I hope are the final tweaks to the new rcorder code. It has the following changes: 1. Silences a grep warning when an rc.d directory in $local_startup is empty. 2. Adds a variable to /etc/defaults/rc.conf called early_late_divider (better name suggestions welcome) that defines the script to use to separate the early and late stages, and the commensurate code in rc. This makes the option configurable, which on the one hand puts a bullet in the foot-shooting gun for careless admins, but on the other hand gives more flexibility to those that can make use of it. 3. Defaults the divider to mountcritlocal, instead of mountcritremote. When last I talked to Brooks about this, he said that this would "probably" be ok even for diskless booting, however I'm willing to make it mountcritremote for now if we're not sure of this. Alternatively, we can make the default mountcritlocal, and instruct diskless booters to change this setting. Since I am not really involved in the diskless booting stuff, I'm totally open to the consensus opinion on this. If we change it, this will move the following scripts into the late stage: /etc/rc.d/var /etc/rc.d/cleanvar /etc/rc.d/random /etc/rc.d/adjkerntz /etc/rc.d/atm1 /etc/rc.d/hostname /etc/rc.d/ipfilter /etc/rc.d/ipnat /etc/rc.d/ipfs /etc/rc.d/kldxref /etc/rc.d/sppp /etc/rc.d/addswap /etc/rc.d/sysctl /etc/rc.d/serial /etc/rc.d/pccard /etc/rc.d/netif /etc/rc.d/isdnd /etc/rc.d/ppp /etc/rc.d/ipfw /etc/rc.d/nsswitch /etc/rc.d/newsyslog /etc/rc.d/syslogd /etc/rc.d/ip6addrctl /etc/rc.d/atm2 /etc/rc.d/pfsync /etc/rc.d/pflog /etc/rc.d/pf /etc/rc.d/routing /etc/rc.d/ip6fw /etc/rc.d/network_ipv6 /etc/rc.d/mroute6d /etc/rc.d/route6d /etc/rc.d/mrouted /etc/rc.d/routed /etc/rc.d/NETWORKING /etc/rc.d/devd /etc/rc.d/ipsec Enjoy, Doug -- This .signature sanitized for your protection --------------020801090309070505050802 Content-Type: text/plain; name="rc.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="rc.diff" Index: rc =================================================================== RCS file: /usr/local/ncvs/src/etc/rc,v retrieving revision 1.337 diff -u -r1.337 rc --- rc 2 Dec 2005 20:06:07 -0000 1.337 +++ rc 8 Dec 2005 21:23:56 -0000 @@ -73,7 +73,7 @@ skip="-s nostart" [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ] && skip="$skip -s nojail" -# Do a first pass to get everything up to mountcritremote so that +# 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} /etc/rc.d/* 2>/dev/null` @@ -82,7 +82,7 @@ run_rc_script ${_rc_elem} ${_boot} case "$_rc_elem" in - */mountcritremote) break ;; + */${early_late_divider}) break ;; esac done @@ -101,7 +101,7 @@ for _rc_elem in ${files}; do case "$_skip_early" in 1) case "$_rc_elem" in - */mountcritremote) _skip_early=0 ;; + */${early_late_divider}) _skip_early=0 ;; esac continue ;; Index: rc.subr =================================================================== RCS file: /usr/local/ncvs/src/etc/rc.subr,v retrieving revision 1.45 diff -u -r1.45 rc.subr --- rc.subr 5 Dec 2005 07:04:15 -0000 1.45 +++ rc.subr 8 Dec 2005 21:20:15 -0000 @@ -1380,7 +1380,7 @@ local_rc='' for dir in ${local_startup}; do if [ -d "${dir}" ]; then - for file in `grep -l '^# PROVIDE:' ${dir}/*`; do + for file in `grep -l '^# PROVIDE:' ${dir}/* 2>/dev/null`; do case "$file" in *.sample) ;; *) if [ -x "$file" ]; then Index: defaults/rc.conf =================================================================== RCS file: /usr/local/ncvs/src/etc/defaults/rc.conf,v retrieving revision 1.265 diff -u -r1.265 rc.conf --- defaults/rc.conf 24 Nov 2005 14:39:41 -0000 1.265 +++ defaults/rc.conf 8 Dec 2005 21:27:04 -0000 @@ -24,6 +24,10 @@ rc_debug="NO" # Set to YES to enable debugging output from rc.d rc_info="NO" # Enables display of informational messages at boot. rcshutdown_timeout="30" # Seconds to wait before terminating rc.shutdown +early_late_divider="mountcritlocal" # Script that separates early/late + # stages of the boot process. Make sure you know + # the ramifications if you change this. + swapfile="NO" # Set to name of swapfile if aux swapfile desired. apm_enable="NO" # Set to YES to enable APM BIOS functions (or NO). apmd_enable="NO" # Run apmd to handle APM event from userland. --------------020801090309070505050802--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4398AB6A.3000209>