From haro@tk.kubota.co.jp Mon Sep 13 05:17:22 1999
Return-Path: <haro@tk.kubota.co.jp>
Received: from kbtfw.kubota.co.jp (kbtfw.kubota.co.jp [133.253.102.202])
	by hub.freebsd.org (Postfix) with ESMTP id C0E5315577
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 13 Sep 1999 05:17:19 -0700 (PDT)
	(envelope-from haro@tk.kubota.co.jp)
Received: by kbtfw.kubota.co.jp; id VAA12921; Mon, 13 Sep 1999 21:17:17 +0900 (JST)
Received: from unknown(133.253.31.1) by kbtfw.kubota.co.jp via smap (4.1)
	id xma012864; Mon, 13 Sep 99 21:16:31 +0900
Received: (from uucp@localhost)
	by lemond.gkn.kubota.co.jp (8.9.3+3.2W/3.7W99070916) with UUCP id VAA10921
	for FreeBSD-gnats-submit@freebsd.org; Mon, 13 Sep 1999 21:16:30 +0900 (JST)
Received: (from haro@localhost)
	by jkpc15.tk.kubota.co.jp (8.9.3/3.7W-uucp) id RAA06304;
	Mon, 13 Sep 1999 17:24:04 +0900 (JST)
Message-Id: <199909130824.RAA06304@jkpc15.tk.kubota.co.jp>
Date: Mon, 13 Sep 1999 17:24:04 +0900 (JST)
From: <haro@tk.kubota.co.jp>
Reply-To: haro@tk.kubota.co.jp
To: FreeBSD-gnats-submit@freebsd.org
Subject: Prevent ".: Out of file descriptors" error on system bootup.
X-Send-Pr-Version: 3.2

>Number:         13724
>Category:       conf
>Synopsis:       Prevent ".: Out of file descriptors" error on system bootup.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 13 05:20:00 PDT 1999
>Closed-Date:    Mon Jun 26 03:27:53 PDT 2000
>Last-Modified:  Mon Jun 26 03:30:06 PDT 2000
>Originator:     Munehiro Matsuda
>Release:        FreeBSD 3.2-STABLE i386
>Organization:
KUBOTA Corp. Technology Development Headquarters, Tokyo Japan
>Environment:

	Tested with FreeBSD 3.2-STABLE, as of CTM's src-3.0273.gz, on a
	NEC VersaProNX.

>Description:

	System will fail to boot with ".: Out of file descriptors" error,
	if by accident, or by what ever reason, overwriting /etc/rc.conf
	with /etc/defaults/rc.conf.
        May be reproducable on -current too?

>How-To-Repeat:

	# cp /etc/defaults/rc.conf /etc/rc.conf
	# reboot

>Fix:
	
	Apply the following patch to etc/defaults/rc.conf, to prevent
	recursive includes of rc_conf_files.

	--- etc/defaults/rc.conf.org	Thu Sep  2 22:22:27 1999
	+++ etc/defaults/rc.conf	Mon Sep 13 16:35:46 1999
	@@ -221,10 +221,15 @@
	 ##############################################################
	 ### Allow local configuration override at the very end here ##
	 ##############################################################
	 #
	 #
	+if [ "${default_rc_conf:-first_time}" = "first_time" ]; then
	+	default_rc_conf="do_fail_safe"
	+else
	+	exit
	+fi
	 
	 for i in ${rc_conf_files}; do
	 	if [ -f $i ]; then
	         	. $i
	 	fi


>Release-Note:
>Audit-Trail:

From: Chris Costello <chris@calldei.com>
To: haro@tk.kubota.co.jp
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: conf/13724: Prevent ".: Out of file descriptors" error on system
 bootup.
Date: Mon, 13 Sep 1999 17:54:34 -0500

 On Mon, Sep 13, 1999, haro@tk.kubota.co.jp wrote:
 > >Description:
 > 
 > 	System will fail to boot with ".: Out of file descriptors" error,
 > 	if by accident, or by what ever reason, overwriting /etc/rc.conf
 > 	with /etc/defaults/rc.conf.
 >         May be reproducable on -current too?
 > 
 > >How-To-Repeat:
 > 
 > 	# cp /etc/defaults/rc.conf /etc/rc.conf
 > 	# reboot
 
    Isn't the real solution to this problem not to copy
 /etc/defaults/rc.conf to /etc/rc.conf?
 
 -- 
 |Chris Costello <chris@calldei.com>
 |Brain -- the apparatus with which we think that we think.
 `---------------------------------------------------------
 

From: Ruslan Ermilov <ru@ucb.crimea.ua>
To: FreeBSD-gnats-submit@FreeBSD.ORG
Cc:  
Subject: Re: conf/13724: Prevent ".: Out of file descriptors" error on system bootup.
Date: Tue, 14 Sep 1999 02:08:50 +0300

 On Mon, Sep 13, 1999 at 04:00:05PM -0700, Chris Costello wrote:
 >  
 >     Isn't the real solution to this problem not to copy
 >  /etc/defaults/rc.conf to /etc/rc.conf?
 >  
 Sure, /etc/defaults/rc.conf warns: "You should not edit this file!"
 
 -- 
 Ruslan Ermilov		Sysadmin and DBA of the
 ru@ucb.crimea.ua	United Commercial Bank,
 ru@FreeBSD.org		FreeBSD committer,
 +380.652.247.647	Simferopol, Ukraine
 
 http://www.FreeBSD.org	The Power To Serve
 http://www.oracle.com	Enabling The Information Age
 

From: haro@tk.kubota.co.jp (Munehiro Matsuda)
To: chris@calldei.com
Cc: FreeBSD-gnats-submit@FreeBSD.ORG, haro@tk.kubota.co.jp
Subject: Re: conf/13724: Prevent ".: Out of file descriptors" error on system
 bootup.
Date: Tue, 14 Sep 1999 14:11:11 +0900

 From: Chris Costello <chris@calldei.com>
 Date: Mon, 13 Sep 1999 17:54:34 -0500
 ::> >Description:
 ::> 
 ::> 	System will fail to boot with ".: Out of file descriptors" error,
 ::> 	if by accident, or by what ever reason, overwriting /etc/rc.conf
 ::> 	with /etc/defaults/rc.conf.
 ::>         May be reproducable on -current too?
 ::> 
 ::> >How-To-Repeat:
 ::> 
 ::> 	# cp /etc/defaults/rc.conf /etc/rc.conf
 ::> 	# reboot
 ::
 ::   Isn't the real solution to this problem not to copy
 ::/etc/defaults/rc.conf to /etc/rc.conf?
 ::
 ::|Chris Costello <chris@calldei.com>
 ::|Brain -- the apparatus with which we think that we think.
 ::`---------------------------------------------------------
 
 Hello Chris,
 
 Yes, that's true. 
 But I've seen quite a few messages saying "I got .: Out of file
 descriptors error, what's wrong?" on -stable and freebsd-users-jp
 mailing-lists. It must be that, people tend to make such a mistake
 easily, without knowing that they shouldn't.
 
 To prevent such a case, I submitted this PR.
 It may also be a good idea to print warning message saying,
 1)should not do such a thing, and 2)should consult rc.conf(5),
 when recursive source of rc.conf is detected.
 
  Thanks you,
   Haro
 
 -------------------------------------------------------------------------------
           _ _    Munehiro (haro) Matsuda
 -|- /_\  |_|_|   Office of Business Planning & Developement, Kubota Corp.
 /|\ |_|  |_|_|	 1-3 Nihonbashi-Muromachi 3-Chome
 		 Chuo-ku Tokyo 103, Japan
                  Tel: +81-3-3245-3318  Fax: +81-3-32454-3315
                  Email: haro@tk.kubota.co.jp
 
 
 
 

From: netch@lucky.net (Valentin Nechayev)
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: Re: conf/13724: Prevent ".: Out of file descriptors" error on system bootup
Date: Fri, 8 Oct 1999 23:40:53 +0300 (EEST)

 Imho the following variant is an example of rather more reasonable
 configuration. Including file with "defaults" in name/path as full
 configuration is some brain-damaged. Also, there is no reason to take
 list of rc.conf files as definition in one of them.
 
 diff -rNu src/etc.orig/defaults/rc.conf src/etc/defaults/rc.conf
 --- src/etc.orig/defaults/rc.conf	Sun Sep 19 16:41:30 1999
 +++ src/etc/defaults/rc.conf	Fri Oct  8 23:01:47 1999
 @@ -1,11 +1,12 @@
  #!/bin/sh
  #
  
 -# This is rc.conf - a file full of useful variables that you can set 
 -# to change the default startup behavior of your system.  You should
 -# not edit this file!  Put any overrides into one of the ${rc_conf_files}
 -# instead and you will be able to update these defaults later without
 -# spamming your local configuration information.
 +# This is /etc/defaults/rc.conf -
 +# a file full of useful variables that you can set to change the default
 +# startup behavior of your system.  You should not edit this file!
 +# Put any overrides into /etc/rc.conf or /etc/rc.conf.local instead
 +# and you will be able to update these defaults later without spamming
 +# your local configuration information.
  #
  # All arguments must be in double or single quotes.
  #
 @@ -25,7 +26,6 @@
  pccardd_flags=""	# Additional flags for pccardd.
  local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d"	# startup script dirs.
  local_periodic="/usr/local/etc/periodic /usr/X11R6/etc/periodic" # periodic script dirs
 -rc_conf_files="/etc/rc.conf /etc/rc.conf.local"
  
  ##############################################################
  ###  Network configuration sub-section  ######################
 @@ -219,16 +219,3 @@
  start_vinum=""		# set to YES to start vinum
  vinum_drives=""		# put in names of disks containing vinum drives
  			# to start vinum on only specific disks.
 -
 -##############################################################
 -### Allow local configuration override at the very end here ##
 -##############################################################
 -#
 -#
 -
 -for i in ${rc_conf_files}; do
 -	if [ -f $i ]; then
 -        	. $i
 -	fi
 -done
 -
 diff -rNu src/etc.orig/netstart src/etc/netstart
 --- src/etc.orig/netstart	Sun Sep  5 11:27:23 1999
 +++ src/etc/netstart	Fri Oct  8 22:37:11 1999
 @@ -9,12 +9,7 @@
  # the network by hand, this script will do it for you).
  #
  
 -# If there is a global system configuration file, suck it in.
 -if [ -f /etc/defaults/rc.conf ]; then
 -	. /etc/defaults/rc.conf
 -elif [ -f /etc/rc.conf ]; then
 -	. /etc/rc.conf
 -fi
 +. /etc/rc.getconf
  
  if [ -f /etc/rc.network ]; then
  	. /etc/rc.network
 diff -rNu src/etc.orig/pccard_ether src/etc/pccard_ether
 --- src/etc.orig/pccard_ether	Sun Sep  5 11:27:23 1999
 +++ src/etc/pccard_ether	Fri Oct  8 22:37:40 1999
 @@ -7,12 +7,7 @@
  # example: pccard_ether ep0 -link0
  #
  
 -# Suck in the configuration variables
 -if [ -f /etc/defaults/rc.conf ]; then
 -	. /etc/defaults/rc.conf
 -elif [ -f /etc/rc.conf ]; then
 -	. /etc/rc.conf
 -fi
 +. /etc/rc.getconf
  
  if [ "x$pccard_ifconfig" != "xNO" ] ; then
  	if [ "x$pccard_ifconfig" = "xDHCP" ] ; then
 diff -rNu src/etc.orig/rc src/etc/rc
 --- src/etc.orig/rc	Tue Sep 14 12:09:46 1999
 +++ src/etc/rc	Fri Oct  8 23:08:10 1999
 @@ -7,9 +7,8 @@
  # Output and error are redirected to console by init,
  # and the console is the controlling terminal.
  
 -# Note that almost all the user-configurable behavior is no longer in
 -# this file, but rather in /etc/defaults/rc.conf.  Please check this file
 -# first before contemplating any changes here.
 +# Check /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local
 +# before contemplating any changes here.
  
  stty status '^T'
  
 @@ -34,11 +33,7 @@
  
  # If there is a global system configuration file, suck it in.
  #
 -if [ -f /etc/defaults/rc.conf ]; then
 -	. /etc/defaults/rc.conf
 -elif [ -f /etc/rc.conf ]; then
 -	. /etc/rc.conf
 -fi
 +. /etc/rc.getconf
  
  # Configure ccd devices.
  if [ -f /etc/ccd.conf ]; then
 @@ -375,7 +370,8 @@
  			# Else send mail to the user.
  			recfile=`awk '/^X-vi-recover-path:/{print $2}' < $i`
  			if test -n "$recfile" -a -s "$recfile"; then
 -				sendmail -t < $i
 +				"${sendmail_program:-/usr/sbin/sendmail}" \
 +					-oi -t < $i
  			else
  				rm -f $i
  			fi
 @@ -414,22 +410,21 @@
  [ -f /etc/rc.devfs ] && sh /etc/rc.devfs
  
  # Do traditional (but rather obsolete) rc.local file if it exists.  If you
 -# use this file and want to make it programmatic, source /etc/defaults/rc.conf
 -# in /etc/rc.local and add your custom variables to /etc/rc.conf, as
 +# use this file and want to make it programmatic, source /etc/rc.getconf
 +# in /etc/rc.local and add your custom variables to /etc/rc.conf.local, as
  # shown below.  Please do not put local extensions into /etc/rc itself. 
  # Use /etc/rc.local
  #
  # ---- rc.local  ----
 -#     if [ -f /etc/defaults/rc.conf ]; then
 -#             . /etc/defaults/rc.conf
 -#     fi
 +#     . /etc/rc.getconf
  #
  #     ... additional startup conditionals ...
  # ---- rc.local  ----
  #
 -if [ -f /etc/rc.local ]; then
 -	echo -n 'starting local daemons:'
 -        sh /etc/rc.local
 +if [ -f /etc/rc.local  -o -f /usr/local/etc/rc.local ]; then
 +	echo -n 'starting local daemons: '
 +        [ -f /etc/rc.local ] && sh /etc/rc.local
 +        [ -f /usr/local/etc/rc.local ] && sh /usr/local/etc/rc.local
  	echo '.'
  fi
  
 diff -rNu src/etc.orig/rc.devfs src/etc/rc.devfs
 --- src/etc.orig/rc.devfs	Sun Sep  5 11:27:25 1999
 +++ src/etc/rc.devfs	Fri Oct  8 22:47:14 1999
 @@ -1,12 +1,8 @@
  #
  # $FreeBSD: src/etc/rc.devfs,v 1.3.2.2 1999/08/29 14:18:55 peter Exp $
  #
 -# If there is a global system configuration file, suck it in.
 -if [ -f /etc/defaults/rc.conf ]; then
 -	. /etc/defaults/rc.conf
 -elif [ -f /etc/rc.conf ]; then
 -	. /etc/rc.conf
 -fi
 +
 +. /etc/rc.getconf
  
  # Setup DEVFS, ie permisisons, links etc.
  
 diff -rNu src/etc.orig/rc.diskless2 src/etc/rc.diskless2
 --- src/etc.orig/rc.diskless2	Tue Mar  9 19:04:40 1999
 +++ src/etc/rc.diskless2	Fri Oct  8 22:48:46 1999
 @@ -1,13 +1,7 @@
  # rc.diskless2
  #
  
 -# If there is a global system configuration file, suck it in.
 -#
 -if [ -f /etc/defaults/rc.conf ]; then
 -	. /etc/defaults/rc.conf
 -elif [ -f /etc/rc.conf ]; then
 -	. /etc/rc.conf
 -fi
 +. /etc/rc.getconf
  
  mount_mfs -s ${varsize:=65536} -T qp120at dummy /var
  var_dirs="run dev db msgs tmp spool spool/mqueue spool/lpd spool/output \
 diff -rNu src/etc.orig/rc.firewall src/etc/rc.firewall
 --- src/etc.orig/rc.firewall	Sun Oct  3 12:12:27 1999
 +++ src/etc/rc.firewall	Fri Oct  8 22:49:41 1999
 @@ -2,15 +2,11 @@
  # Setup system for firewall service.
  # $FreeBSD: src/etc/rc.firewall,v 1.19.2.3 1999/09/30 04:56:27 mpp Exp $
  
 -# Suck in the configuration variables.
 -if [ -f /etc/defaults/rc.conf ]; then
 -	. /etc/defaults/rc.conf
 -elif [ -f /etc/rc.conf ]; then
 -	. /etc/rc.conf
 -fi
 +. /etc/rc.getconf
  
  ############
 -# Define the firewall type in /etc/rc.conf.  Valid values are:
 +# Define the firewall type in /etc/rc.conf or /etc/rc.conf.local.
 +# Valid values are:
  #   open     - will allow anyone in
  #   client   - will try to protect just this machine
  #   simple   - will try to protect a whole network
 diff -rNu src/etc.orig/rc.getconf src/etc/rc.getconf
 --- src/etc.orig/rc.getconf	Thu Jan  1 03:00:00 1970
 +++ src/etc/rc.getconf	Fri Oct  8 23:06:51 1999
 @@ -0,0 +1,14 @@
 +# rc.getconf - compose configuration from defaults, central and local file.
 +# $Id$
 +
 +for FILE in \
 +		/etc/defaults/rc.conf \
 +		/etc/rc.conf \
 +		/etc/rc.conf.local \
 +		/usr/local/etc/rc.conf \
 +		/usr/local/etc/rc.conf.local
 +do
 +	if [ -f "$FILE" ] ; then
 +		. "$FILE"
 +	fi
 +done
 diff -rNu src/etc.orig/rc.network src/etc/rc.network
 --- src/etc.orig/rc.network	Sat Sep 25 23:23:24 1999
 +++ src/etc/rc.network	Fri Oct  8 22:50:20 1999
 @@ -4,7 +4,7 @@
  #	From: @(#)netstart	5.9 (Berkeley) 3/30/91
  
  # Note that almost all the user-configurable behavior is no longer in
 -# this file, but rather in /etc/rc.conf.  Please check that file
 +# this file, but rather in /etc/[defaults/]rc.conf.*.  Please check that file
  # first before contemplating any changes here.  If you do need to change
  # this file for some reason, we would like to know about it.
  
 

From: netch@lucky.net (Valentin Nechayev)
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: Re: conf/13724: Prevent ".: Out of file descriptors" error on system bootup
Date: Fri, 8 Oct 1999 23:40:53 +0300 (EEST)

 Imho the following variant is an example of rather more reasonable
 configuration. Including file with "defaults" in name/path as full
 configuration is some brain-damaged. Also, there is no reason to take
 list of rc.conf files as definition in one of them.
 
 diff -rNu src/etc.orig/defaults/rc.conf src/etc/defaults/rc.conf
 --- src/etc.orig/defaults/rc.conf	Sun Sep 19 16:41:30 1999
 +++ src/etc/defaults/rc.conf	Fri Oct  8 23:01:47 1999
 @@ -1,11 +1,12 @@
  #!/bin/sh
  #
  
 -# This is rc.conf - a file full of useful variables that you can set 
 -# to change the default startup behavior of your system.  You should
 -# not edit this file!  Put any overrides into one of the ${rc_conf_files}
 -# instead and you will be able to update these defaults later without
 -# spamming your local configuration information.
 +# This is /etc/defaults/rc.conf -
 +# a file full of useful variables that you can set to change the default
 +# startup behavior of your system.  You should not edit this file!
 +# Put any overrides into /etc/rc.conf or /etc/rc.conf.local instead
 +# and you will be able to update these defaults later without spamming
 +# your local configuration information.
  #
  # All arguments must be in double or single quotes.
  #
 @@ -25,7 +26,6 @@
  pccardd_flags=""	# Additional flags for pccardd.
  local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d"	# startup script dirs.
  local_periodic="/usr/local/etc/periodic /usr/X11R6/etc/periodic" # periodic script dirs
 -rc_conf_files="/etc/rc.conf /etc/rc.conf.local"
  
  ##############################################################
  ###  Network configuration sub-section  ######################
 @@ -219,16 +219,3 @@
  start_vinum=""		# set to YES to start vinum
  vinum_drives=""		# put in names of disks containing vinum drives
  			# to start vinum on only specific disks.
 -
 -##############################################################
 -### Allow local configuration override at the very end here ##
 -##############################################################
 -#
 -#
 -
 -for i in ${rc_conf_files}; do
 -	if [ -f $i ]; then
 -        	. $i
 -	fi
 -done
 -
 diff -rNu src/etc.orig/netstart src/etc/netstart
 --- src/etc.orig/netstart	Sun Sep  5 11:27:23 1999
 +++ src/etc/netstart	Fri Oct  8 22:37:11 1999
 @@ -9,12 +9,7 @@
  # the network by hand, this script will do it for you).
  #
  
 -# If there is a global system configuration file, suck it in.
 -if [ -f /etc/defaults/rc.conf ]; then
 -	. /etc/defaults/rc.conf
 -elif [ -f /etc/rc.conf ]; then
 -	. /etc/rc.conf
 -fi
 +. /etc/rc.getconf
  
  if [ -f /etc/rc.network ]; then
  	. /etc/rc.network
 diff -rNu src/etc.orig/pccard_ether src/etc/pccard_ether
 --- src/etc.orig/pccard_ether	Sun Sep  5 11:27:23 1999
 +++ src/etc/pccard_ether	Fri Oct  8 22:37:40 1999
 @@ -7,12 +7,7 @@
  # example: pccard_ether ep0 -link0
  #
  
 -# Suck in the configuration variables
 -if [ -f /etc/defaults/rc.conf ]; then
 -	. /etc/defaults/rc.conf
 -elif [ -f /etc/rc.conf ]; then
 -	. /etc/rc.conf
 -fi
 +. /etc/rc.getconf
  
  if [ "x$pccard_ifconfig" != "xNO" ] ; then
  	if [ "x$pccard_ifconfig" = "xDHCP" ] ; then
 diff -rNu src/etc.orig/rc src/etc/rc
 --- src/etc.orig/rc	Tue Sep 14 12:09:46 1999
 +++ src/etc/rc	Fri Oct  8 23:08:10 1999
 @@ -7,9 +7,8 @@
  # Output and error are redirected to console by init,
  # and the console is the controlling terminal.
  
 -# Note that almost all the user-configurable behavior is no longer in
 -# this file, but rather in /etc/defaults/rc.conf.  Please check this file
 -# first before contemplating any changes here.
 +# Check /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local
 +# before contemplating any changes here.
  
  stty status '^T'
  
 @@ -34,11 +33,7 @@
  
  # If there is a global system configuration file, suck it in.
  #
 -if [ -f /etc/defaults/rc.conf ]; then
 -	. /etc/defaults/rc.conf
 -elif [ -f /etc/rc.conf ]; then
 -	. /etc/rc.conf
 -fi
 +. /etc/rc.getconf
  
  # Configure ccd devices.
  if [ -f /etc/ccd.conf ]; then
 @@ -375,7 +370,8 @@
  			# Else send mail to the user.
  			recfile=`awk '/^X-vi-recover-path:/{print $2}' < $i`
  			if test -n "$recfile" -a -s "$recfile"; then
 -				sendmail -t < $i
 +				"${sendmail_program:-/usr/sbin/sendmail}" \
 +					-oi -t < $i
  			else
  				rm -f $i
  			fi
 @@ -414,22 +410,21 @@
  [ -f /etc/rc.devfs ] && sh /etc/rc.devfs
  
  # Do traditional (but rather obsolete) rc.local file if it exists.  If you
 -# use this file and want to make it programmatic, source /etc/defaults/rc.conf
 -# in /etc/rc.local and add your custom variables to /etc/rc.conf, as
 +# use this file and want to make it programmatic, source /etc/rc.getconf
 +# in /etc/rc.local and add your custom variables to /etc/rc.conf.local, as
  # shown below.  Please do not put local extensions into /etc/rc itself. 
  # Use /etc/rc.local
  #
  # ---- rc.local  ----
 -#     if [ -f /etc/defaults/rc.conf ]; then
 -#             . /etc/defaults/rc.conf
 -#     fi
 +#     . /etc/rc.getconf
  #
  #     ... additional startup conditionals ...
  # ---- rc.local  ----
  #
 -if [ -f /etc/rc.local ]; then
 -	echo -n 'starting local daemons:'
 -        sh /etc/rc.local
 +if [ -f /etc/rc.local  -o -f /usr/local/etc/rc.local ]; then
 +	echo -n 'starting local daemons: '
 +        [ -f /etc/rc.local ] && sh /etc/rc.local
 +        [ -f /usr/local/etc/rc.local ] && sh /usr/local/etc/rc.local
  	echo '.'
  fi
  
 diff -rNu src/etc.orig/rc.devfs src/etc/rc.devfs
 --- src/etc.orig/rc.devfs	Sun Sep  5 11:27:25 1999
 +++ src/etc/rc.devfs	Fri Oct  8 22:47:14 1999
 @@ -1,12 +1,8 @@
  #
  # $FreeBSD: src/etc/rc.devfs,v 1.3.2.2 1999/08/29 14:18:55 peter Exp $
  #
 -# If there is a global system configuration file, suck it in.
 -if [ -f /etc/defaults/rc.conf ]; then
 -	. /etc/defaults/rc.conf
 -elif [ -f /etc/rc.conf ]; then
 -	. /etc/rc.conf
 -fi
 +
 +. /etc/rc.getconf
  
  # Setup DEVFS, ie permisisons, links etc.
  
 diff -rNu src/etc.orig/rc.diskless2 src/etc/rc.diskless2
 --- src/etc.orig/rc.diskless2	Tue Mar  9 19:04:40 1999
 +++ src/etc/rc.diskless2	Fri Oct  8 22:48:46 1999
 @@ -1,13 +1,7 @@
  # rc.diskless2
  #
  
 -# If there is a global system configuration file, suck it in.
 -#
 -if [ -f /etc/defaults/rc.conf ]; then
 -	. /etc/defaults/rc.conf
 -elif [ -f /etc/rc.conf ]; then
 -	. /etc/rc.conf
 -fi
 +. /etc/rc.getconf
  
  mount_mfs -s ${varsize:=65536} -T qp120at dummy /var
  var_dirs="run dev db msgs tmp spool spool/mqueue spool/lpd spool/output \
 diff -rNu src/etc.orig/rc.firewall src/etc/rc.firewall
 --- src/etc.orig/rc.firewall	Sun Oct  3 12:12:27 1999
 +++ src/etc/rc.firewall	Fri Oct  8 22:49:41 1999
 @@ -2,15 +2,11 @@
  # Setup system for firewall service.
  # $FreeBSD: src/etc/rc.firewall,v 1.19.2.3 1999/09/30 04:56:27 mpp Exp $
  
 -# Suck in the configuration variables.
 -if [ -f /etc/defaults/rc.conf ]; then
 -	. /etc/defaults/rc.conf
 -elif [ -f /etc/rc.conf ]; then
 -	. /etc/rc.conf
 -fi
 +. /etc/rc.getconf
  
  ############
 -# Define the firewall type in /etc/rc.conf.  Valid values are:
 +# Define the firewall type in /etc/rc.conf or /etc/rc.conf.local.
 +# Valid values are:
  #   open     - will allow anyone in
  #   client   - will try to protect just this machine
  #   simple   - will try to protect a whole network
 diff -rNu src/etc.orig/rc.getconf src/etc/rc.getconf
 --- src/etc.orig/rc.getconf	Thu Jan  1 03:00:00 1970
 +++ src/etc/rc.getconf	Fri Oct  8 23:06:51 1999
 @@ -0,0 +1,14 @@
 +# rc.getconf - compose configuration from defaults, central and local file.
 +# $Id$
 +
 +for FILE in \
 +		/etc/defaults/rc.conf \
 +		/etc/rc.conf \
 +		/etc/rc.conf.local \
 +		/usr/local/etc/rc.conf \
 +		/usr/local/etc/rc.conf.local
 +do
 +	if [ -f "$FILE" ] ; then
 +		. "$FILE"
 +	fi
 +done
 diff -rNu src/etc.orig/rc.network src/etc/rc.network
 --- src/etc.orig/rc.network	Sat Sep 25 23:23:24 1999
 +++ src/etc/rc.network	Fri Oct  8 22:50:20 1999
 @@ -4,7 +4,7 @@
  #	From: @(#)netstart	5.9 (Berkeley) 3/30/91
  
  # Note that almost all the user-configurable behavior is no longer in
 -# this file, but rather in /etc/rc.conf.  Please check that file
 +# this file, but rather in /etc/[defaults/]rc.conf.*.  Please check that file
  # first before contemplating any changes here.  If you do need to change
  # this file for some reason, we would like to know about it.
  
 
State-Changed-From-To: open->closed 
State-Changed-By: nbm 
State-Changed-When: Mon Jun 26 03:27:53 PDT 2000 
State-Changed-Why:  
This has recently been fixed in 5.0-CURRENT, and PR 17595 remains open 
to remind sheldonh to backport. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=13724 
>Unformatted:
