Index: etc/defaults/rc.conf =================================================================== --- etc/defaults/rc.conf +++ etc/defaults/rc.conf @@ -17,6 +17,8 @@ # # $FreeBSD$ +: ${__RC_CONF=/etc/rc.conf} + ############################################################## ### Important initial Boot-time options #################### ############################################################## @@ -701,6 +703,9 @@ source_rc_confs_defined=yes source_rc_confs() { local i sourced_files + if [ ! -z "${__RC_CONF}" ]; then + rc_conf_files=${__RC_CONF} + fi for i in ${rc_conf_files}; do case ${sourced_files} in *:$i:*) Index: etc/rc.subr =================================================================== --- etc/rc.subr +++ etc/rc.subr @@ -33,6 +33,7 @@ # : ${RC_PID:=$$}; export RC_PID +: ${__RC_CONF=/etc/rc.conf} # # Operating System dependent/independent variables @@ -1373,9 +1374,9 @@ debug "Sourcing /etc/defaults/rc.conf" . /etc/defaults/rc.conf source_rc_confs - elif [ -r /etc/rc.conf ]; then - debug "Sourcing /etc/rc.conf (/etc/defaults/rc.conf doesn't exist)." - . /etc/rc.conf + elif [ -r ${__RC_CONF} ]; then + debug "Sourcing ${__RC_CONF} (/etc/defaults/rc.conf doesn't exist)." + . ${__RC_CONF} fi _rc_conf_loaded=true fi