On 14-10-28 08:46 AM, Steve Litt wrote:
> Is /etc/rc.local just some artifact I should ignore, or does it
> actually have a purpose?

Both.

RTFM: rc(8), rc.conf(8), rcctl(8)

While that manpage uses language like "It is **advisable** to leave 
rc.conf untouched", the actual situation is much stricter than that - 
don't touch rc.conf unless you're deliberately changing the rc(8) system.

In 5.6, rc.conf.local changes rather dramatically (but invisibly for 
most people) with the introduction of rcctl(8).  AFAIK rcctl(8) has the 
ability to alter rc.conf.local but not rc.conf.

As of the current point in time, the name "rc.conf" reflects the 
separation of logic (/etc/rc) from data (/etc/rc.conf).  Then, 
/etc/rc.conf.local is a historically-consistent file to override the 
system defaults contained in /etc/rc.conf.

This has the advantage that to return to "factory defaults" you simply 
erase rc.conf.local - you don't have to remember what you changed in 
rc.conf.  This makes upgrades easier, and rcctl(8) should make 
multi-system management much easier, too.

The question you actually asked was about /etc/rc.local, which serves a 
completely different function.  That file remains a shell script wherein 
you can put whatever custom craziness you like, that gets executed once 
at boot time.  Typically you would only use this for executing 
system-specific commands to initialize non-packaged software that you've 
compiled yourself.

-- 
-Adam Thompson
  [email protected]

Reply via email to