rc.conf revisited

After using FreeBSD quite a bit over last few years on several systems, I keep looking at various rc.conf's and see numerous lines which have been added sporadically often without fully realising what they were for. Now, after installing 11.2, I'm trying to be a bit more methodical and document any additions or changes, maybe there is some sort of change control I should adopt...

Is anyone aware of web pages explaining what to put in rc.conf ?

I noticed the other day after installing manually that this file doesn't actually exist and the system will boot up without it. I'd be interested in any hints/tips about things which should be included, specifically things like kld_list= .
 
There is a template in /etc/defaults/rc.conf that will help you.

kld_list is easy. Any kernel module not in the KERNCONF can be loaded with it.

So go to /boot/kernel/ and pick any module(*.ko). That module name(without file extension) you can add to kld_list.

Now if your KERNCONF already compiled the module into the kernel, you will get a message stating it is already loaded.
For instance anything you can kldload from the command prompt, you can start automatically with kld_list in /etc/rc.conf.

Same goes for /boot/loader.conf. Any module not compiled in can be loaded with this: module_name_load="YES"
/boot/loader.conf starts up sooner in the boot process than /etc/rc.conf so your device is available sooner.
 
Also be aware, that instead of using a monolith /etc/rc.conf, you can move per-service or per-module configuration to separate files in /etc/rc.conf.d/. The point is, that you can share common configuration files between servers, like routing, database, web server, application server configuration, etc., and keep local configuration in /etc/rc.conf. It's a matter of personal taste (or a site policy). However I've noticed, that sysrc(8) doesn't work that well with files in /etc/rc.conf.d/; perhaps I'm missing something...
 
Back
Top