Stuart Henderson wrote:
> On 2009-11-30, ~Lst <slack...@gmail.com> wrote:
>> On Tue, Dec 1, 2009 at 12:10 AM, Alexander Hall <alexan...@beard.se> wrote:
>>> ~Lst wrote:
>>>
>>>> Well gentlemen...
>>>> Right now, it looks like my bgplg has been running well, because of my
>>>> mistake that is the running of bgpd_flags in two places.
>>>>
>>>> 1. The bgpd_flags that is running via /etc/rc.conf.local
>>>> (bgpd_flags="-r /var/www/logs/bgpd.rsock" -> exactly like described in
>>>> the man pages).
>>>> 2. Had been running too in /etc/rc.conf (bgpd_flags="").
>>> None of the above starts the daemon per se. They only tell the rc
>>> scripts that you want to run the daemon, and how. The entry in
>>> rc.conf.local overrides the one in rc.conf.
>>>
>>> If your problem is solved, fine. I just do not think that what you
>>> describe above would cause any problems, unless what you wanted was the
>>> setting in rc.conf.
>>>
>> Yup, you're right. I just don't realized that I'd been already started
>> the socket through the rc.conf.

Again, rc.conf did not start anything, and unless you made fatal changes
to it, the value for "bgpd_flags" actually used (by /etc/rc) would be
the one from rc.conf.local.

>> It might be a `mistake' for a newbie like me, if you want to running
>> one thing in rc.conf.local it overrides the one in rc.conf.
> 
> treat rc.conf as a part of the OS, not a user config file - you should
> leave it alone (except to upgrade it with the rest of the OS).
> 
> if you want to make any changes, copy the relevant lines to rc.conf.local
> and edit as required.
> 

...as is stated in the FAQ (http://www.openbsd.org/faq/faq10.html#rc)

"We strongly suggest you never touch /etc/rc.conf itself. Instead,
create the file /etc/rc.conf.local, copy just the lines you need to
change from /etc/rc.conf and adjust them as you like."

...and in rc.conf(8):

"It is advisable to leave the /etc/rc.conf file untouched, and instead
 create and edit a new /etc/rc.conf.local file.  Variables set in this
 file will override variables previously set in /etc/rc.conf."

However, the latter could really use a facelift to better reflect that
changes should indeed go into /etc/rc.conf.local instead. Currently it
speaks of things like "To run NFS, just change this line's value from NO
to YES" which is a wonderful example of not following the
recommendations a few lines up.

I have yet to see any reason to ever change /etc/rc.conf per se. I dare
to say there is none.

/Alexander

Reply via email to