From 59db35bde2503abe71cac5a91acaedd768348893 Mon Sep 17 00:00:00 2001 From: dillon Date: Sun, 22 Dec 2002 22:18:41 +0000 Subject: Do not unconditionally load the configuration files for the RCNG case. Instead, load them as part of the rc.d system. This allows us to prioritize the initidiskless script so it runs before the configuration files are loaded and allows us to get rid of the exit 2 hack in /etc/rc. The exit 2 never worked anyway since it did not unset the prior configuration, causing the diskless code to not operate properly. Do a major cleanup and revamping of the diskless code for RCNG. This will be backported to the non-RCNG scripts as well as -stable. With suggestions from: Mike Makonnen MFC after: 7 days --- etc/rc | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'etc/rc') diff --git a/etc/rc b/etc/rc index 636fdbc..3a660e9 100644 --- a/etc/rc +++ b/etc/rc @@ -69,11 +69,10 @@ case ${rc_ng} in [Yy][Ee][Ss]) . /etc/rc.subr - # Load system configuration files. The 'XXX' is there because - # the function requires an argument that we don't need to use. + # Note: the system configuration files are loaded as part of + # the RCNG system (rc.d/rccond). Do not load them here as it may + # interfere with diskless booting. # - load_rc_config 'XXX' - if [ "$1" = autoboot ]; then autoboot=yes _boot="faststart" @@ -88,13 +87,6 @@ case ${rc_ng} in for _rc_elem in ${files}; do run_rc_script ${_rc_elem} ${_boot} - # Local FreeBSD hack to reload the rc.conf on - # a return status of 2 - if [ $? -eq 2 ]; then - unset _rc_conf_loaded - load_rc_config 'XXX' - echo "Reloading rc.conf." - fi done echo '' -- cgit v1.1