Skip site navigation (1)Skip section navigation (2)
From:      "Dylan A. Loomis" <dylan@aero.org>
To:        Monte Westlund <montejw@memes.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: bad rc.conf?
Message-ID:  <19990922110505.A27630@rushe.aero.org>
In-Reply-To: <3.0.5.32.19990922105121.007abbd0@memes.com>; from Monte Westlund on Wed, Sep 22, 1999 at 10:51:21AM -0700
References:  <3.0.5.32.19990922105121.007abbd0@memes.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 22, 1999 at 10:51:21AM -0700, Monte Westlund wrote:
> Hello,
> I think I may have made a mistake.
> 
> FreeBSD ver 3.x (the current one)
> 
> I have COPIED /etc/defaults/rc.conf to /etc/rc.conf, and now the machine
> (486) either won't boot or is just taking a very long time to boot. There
> is a copy of rc.conf in both directories and they are the same.
> 
> What should / can I do?
> 
> Thanks in advance,
> Monte Westlund
> -Monte
> montejw@memes.com
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

Monte, uhm next time take a look at the files before blindly copying them ;)

But with that said, we all do nutty stuff on occasion.  If all you have done
is copied the file from /etc/defaults/rc.conf to /etc/rc.conf you should be
able to boot it up into single user mode (i think).

If you can get booted, you need to rm /etc/rc.conf since its a duplicate of
/etc/default/rc.conf.  Really /etc/rc.conf is just meant to override any
settings in the /etc/default/rc.conf from the /etc/default/rc.conf file:

--Begin include--

# 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.
#

--End include--

The problem is that /etc/defaults/rc.conf calls /etc/rc.conf so when you copied
the file you created a loop here:

--Begin include--

rc_conf_files="/etc/rc.conf /etc/rc.conf.local"

...

##############################################################
### Allow local configuration override at the very end here ##
##############################################################
#
#

for i in ${rc_conf_files}; do
        if [ -f $i ]; then
                . $i
        fi
done

--End include--

So once it gets to /etc/rc.conf it just starts looping recalling /etc/rc.conf.
If you can get booted, delete the /etc/rc.conf, and try booting multiuser the
only problem is that you are going to lose all of your system specific stuff
you entered, you could always mv the file and then only add the lines that are
specific to your system to your /etc/rc.conf to override the default values.

E.g. an /etc/rc.conf may only include:

--Begin include--

# This file now contains just the overrides from /etc/defaults/rc.conf
# please make all changes to this file.

ifconfig_xl0="inet 192.168.1.2  netmask 255.255.255.0"

# Mouse settings
moused_enable="YES"
moused_port="/dev/psm0"
moused_type="ps/2"

# Network stuff
defaultrouter="192.168.1.1"
network_interfaces="xl0 lo0"

hostname="foo.domain.net"

--End include--


			hope that helps -DAL-

-- 
Dylan A. Loomis
Computer Systems Research Department     The Aerospace Corporation
e-mail: dylan@aero.org                   phone: (310) 336-2449

PGP Key fingerprint =  55 DE BB DD 34 10 CD 20  72 79 88 FE 02 0E 21 3A
PGP 2.6.2 key available upon request


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990922110505.A27630>