summaryrefslogtreecommitdiffstats
path: root/etc/rc
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2002-12-22 22:18:41 +0000
committerdillon <dillon@FreeBSD.org>2002-12-22 22:18:41 +0000
commit59db35bde2503abe71cac5a91acaedd768348893 (patch)
tree7a4959cdbe6bcce1760e14e20b92457e482609c6 /etc/rc
parentf2916da2791f333ec0f2f358bf35929a351bd2e0 (diff)
downloadFreeBSD-src-59db35bde2503abe71cac5a91acaedd768348893.zip
FreeBSD-src-59db35bde2503abe71cac5a91acaedd768348893.tar.gz
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 <mtm@identd.net> MFC after: 7 days
Diffstat (limited to 'etc/rc')
-rw-r--r--etc/rc14
1 files changed, 3 insertions, 11 deletions
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 ''
OpenPOWER on IntegriCloud