Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Feb 2001 09:58:03 +0000
From:      Nik Clayton <nik@freebsd.org>
To:        pkdbeard@yahoo.com
Cc:        doc@FreeBSD.org
Subject:   Re: This seems unhelpful
Message-ID:  <20010226095803.A1274@canyon.nothing-going-on.org>
In-Reply-To: <20010226052121.TCUV29648.femail4.sdc1.sfba.home.com@pink>; from paulbeard@mac.com on Sun, Feb 25, 2001 at 09:20:28PM -0800
References:  <20010226052121.TCUV29648.femail4.sdc1.sfba.home.com@pink>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Feb 25, 2001 at 09:20:28PM -0800, paul wrote:
> http://www.FreeBSD.org/docs/en/books/faq/networking.html#CREATE-DEV-NET
> 
> I'm stumbling thru an install of freeBSD and I came across what looked 
> like a helpful FAQ response. Following it's instructions, I found that 
> rc.network is *not* where you make these changes, but rather 
> /etc/defaults/rc.conf. 

/etc/defaults/rc.conf contains defaults.  You should place your changes
in /etc/rc.conf.  This makes it possible to see, at a glance, what you
have changed in your system's configuration, without having to hunt
through a myriad of small files.

> Of course, /etc/rc.network says not to edit it without telling someone 
> about it. /etc/defaults/rc.conf says not to edit it, but instead the 
> specific rc.* file needed. 

/etc/defaults/rc.conf says

    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.

As you know, ${rc_conf_files} is a variable reference, and if you look
through /etc/defaults/rc.conf you'll see it contains the line

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

so you can put your overrides in either of those two files.

For example, to set your system hostname you might be accustomed to
doing something like

    # hostname foo.example.com
    # echo `hostname` > /etc/myname

or similar.  On FreeBSD you would run the hostname(1) command, and then
edit /etc/rc.conf and make sure it has the line

    hostname="foo.example.com"

in it.

See the rc.conf(5) manual page for more information.

> I'm used to a simple direct syntax like ifconfig ed0 192.168.2.6 up. Is 
> that not possible here? 

That will work.  To make it persistant across reboots you would put the
following in /etc/rc.conf

    ifconfig_ed0="inet 192.168.2.6 netmask 0xffffff00"

N
-- 
Internet connection, $19.95 a month.  Computer, $799.95.  Modem, $149.95.
Telephone line, $24.95 a month.  Software, free.  USENET transmission,
hundreds if not thousands of dollars.  Thinking before posting, priceless.
Somethings in life you can't buy.  For everything else, there's MasterCard.
  -- Graham Reed, in the Scary Devil Monastery

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




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