How low can your /etc/rc.conf go?

The idea here is - much like a limbo competition - just how small can your /etc/rc.conf file be and still have a useful system?

Just share the line count along with what sort of functionality eg. NAS server, web server, or full-on desktop. I am not asking anyone to post their /etc/rc.conf file. We trust you.

Mine currently stands at 22 lines (but used to be much, much shorter).

FreeBSD has some decent, sane defaults so I suspect there are some tiny rc.conf files out there.
 
Don't recommend it but you can cram everything on one line, it's a shell script 👿
 
Thanks VladiBG. FWIW - I have no /etc/rc.conf.local file and nothing in /etc/rc.conf.d. There's all sorts of stuff under /usr/local/etc/rc.d but I expect that after installing a port or package.

SirDice - no I wouldn't want to maintain that.
 
[FONT=monospace]SirDice[/FONT] - no I wouldn't want to maintain that.
Maintaining wasn't part of the original question. :)

Looking at mine and what is enabled by /etc/defaults/rc.conf, I think a minimal one if you are using ZFS would be:

hostname
ifconfig_<yourinterfacehere>
zfs_enable

Additional ones that would likely be done:
kld_list
ntpd_enable
sshd_enable

so a total of about 6 distinct lines to ease maintence. Mine is not much more than that, a few line related to firewall config and tweaking a few services, so I'm at about 15 lines excluding comments and blank lines.
 
I learned very early on to "grep enable /etc/defaults/rc.conf | grep -i yes" to see what is enabled by default so I don't need to double up. Change the "yes" to "no" to see what you may want to enable.

I think a fresh install doesn't have much more than the first 3 lines I point out.
 
Back
Top