what is the relationship between switches in rc.conf and the actual command?

Hi all,

VERY green newbie here. I am trying to understand the philosophy of the FreeBSD environment. I don't know how to search for this topic as the key words I need to use are either too vague or too focused.

Here's an example... adding
Code:
gateway_enable="YES"

in rc.conf is the equivalent of typing sysctl net.inet.ip.forwarding=1.

My question is why? Is "gateway" an alias?
If I wanted to look-up another switch in rc.conf like allscreens_flags, how could I find out that it's a vidcontrol action?
 
There often is very little relationship between rc.conf keywords and the commands or actions they cause. Entries in rc.conf are meant to be short-form, easily configured options. Sometimes one setting does a bunch of things, like ifconfig_em0="SYNCDHCP". These are somewhat documented in /etc/defaults/rc.conf (do not edit that file), but the only way to tell in-depth what they do is to look at the scripts /etc/rc.subr and all of the files in /etc/rc.d.
 
Thank you for your formatting help and your reply. I looked at the man page for rc.conf and found that it does explain the calling of vidcontrol for
Code:
allscreens_flags="MODE_xxx"
As you suggested I also searched /etc/rc.subr for the keyword "gateway" but I did not find it. I apologize if I inadvertently used an example that is an exception to the rule. Since "gateway" is not a file in /etc/rc.d or a routine in /etc/rc.subr how is it translated to sysctl?
 
Back
Top