Does /etc/rc.conf.local work?


Running the latest stable

$ uname -a                                                                        
FreeBSD macmini 12.0-CURRENT FreeBSD 12.0-CURRENT #66 ac2f0aa3b(trueos-stable)-dirty: Wed Jun 21 01:09:23 UTC 2017     root@gauntlet:/usr/obj/usr/src/sys/GENERIC  amd64

the file /etc/rc.conf.local is not read at startup. The file is also named in /etc/defaults/rc.conf but not read.

Is it a bug or am I missing something ?


I think it depends on “what’s in it”. It looks like it should be run, but maybe you’re falling into an issue with the OpenRC conversion.
What do you have in it and what is not working?
If you internet search for freebsd rc.conf.local it seems like it may have been deprecated/on it’s way out a while ago.


I tested last week for something else. It works. We need to document @mrt134.

In the meantime see this for how to use the local service.

Its really nice because you can just throw in regular shell scripts, make them silent, or not.


For testing a single line:

$ cat /etc/rc.conf.local 


Second test with OpenRC statements:

$ cat /etc/rc.conf.local 

doesn’t work.
Putting these lines in /etc/rc.conf it works.


Well, I’m guessing that rc.conf.local doesn’t work and should be removed. I think it’s actually a leftover from a long time ago, before /etc/defaults/rc.conf


Regarding: “rc.conf.local doesn’t work and should be removed. I think it’s actually a leftover from a long time ago, before /etc/defaults/rc.conf”

I think, a comment is needed here.

Traditionally, in FreeBSD there exist or are possible 3 “rc.conf” files:

  1. /etc/defaults/rc.conf
  2. /etc/rc.conf
  3. /etc/rc.conf.local

The reason and necessity for the existence of all 3 of them is explainable as follows:

The first one is intended exclusively for the vendor. That would be the people of the FreeBSD Project or developers of TrueOS. The local network administrator or local computer administrator should know it but shouldn’t touch it.

The second one is intended exclusively for the local network administrator, if there is one. The vendor gives a promise to never touch it after initializing it during installation.

The third one is for local modifications deemed necessary by the local administrator to override general pre-set settings not special enough for the purpose of the local single machine.

Home users often forget the network administration aspects of configuration, and therefore think only about their single machine. This leads to misunderstandings regarding decisions made by the vendors.

Any Unix(-like) operating system was right from the start invented as multi-user and networking capable. This always includes the need for network administration being separatable/separate from local machine administration.


You left out the part where I said “I’m guessing” :wink:
But as it applies to a home user, perhaps not even trying to run it (essentially removing it) gives less confusion. It doesn’t even appear to be running for the OP, so having it there is more confusing than removing it.


I misread this originally as rc.local. This is an easy fix if I recall correctly it is just sourced in /etc/defaults/rc.conf. I will look at this tomorrow. Typically we make our changes now in /etc/defaults/rc.conf vs /etc.rc.conf.trueos. It is rc.conf.trueos that was deprecated. I suspect not sourcing rc.conf.local was an oversight.


Try in /etc/rc.conf


If you’re trying to load coretemp (CPU temps) for display in some utility.


It looks like /etc/defaults/rc.conf has /etc/rc.conf.local called out in rc_conf_files.


In /etc/rc.conf I can use:


or your


Thanks for the (undocumented) info!


That is a feature unique to TrueOS. FreeBSD does not have such parameter. I asked Kris to add so we could automate installing nVidia when loader.conf became no longer viable for EFI. This allowed us to avoid overriding a users predefined module prefereces.