- rework this section a little by including an info which applies to

the current state of how the things are done
- add a new paragraph covering the fact that rc.conf is read by sh(1)

PR:		docs/157894
Reviewed by:	gavin, simon, Niclas Zeising
This commit is contained in:
Daniel Gerzo 2011-06-15 13:44:49 +00:00
parent a88e07ba96
commit 09d745a8bd
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=37384

View file

@ -252,30 +252,27 @@
<para>A number of strategies may be applied in clustered <para>A number of strategies may be applied in clustered
applications to separate site-wide configuration from applications to separate site-wide configuration from
system-specific configuration in order to keep administration system-specific configuration in order to keep administration
overhead down. The recommended approach is to place site-wide overhead down. The recommended approach is to place
configuration into another file, system-specific configuration into the
such as <filename>/etc/rc.conf.site</filename>, and then include <filename>/etc/rc.conf.local</filename> file. For
this file into <filename>/etc/rc.conf</filename>, which will example:</para>
contain only system-specific information.</para>
<para>As <filename>rc.conf</filename> is read by &man.sh.1; it is
trivial to achieve this. For example:</para>
<itemizedlist> <itemizedlist>
<listitem><para>rc.conf:</para> <listitem><para><filename>/etc/rc.conf</filename>:</para>
<programlisting> . /etc/rc.conf.site
hostname="node15.example.com" <programlisting>sshd_enable="YES"
network_interfaces="fxp0 lo0" keyrate="fast"
ifconfig_fxp0="inet 10.1.1.1"</programlisting></listitem> defaultrouter="10.1.1.254"</programlisting></listitem>
<listitem><para>rc.conf.site:</para>
<programlisting> defaultrouter="10.1.1.254" <listitem><para><filename>/etc/rc.conf.local</filename>:</para>
saver="daemon"
blanktime="100"</programlisting></listitem> <programlisting>hostname="node1.example.org"
ifconfig_fxp0="inet 10.1.1.1/8"</programlisting></listitem>
</itemizedlist> </itemizedlist>
<para>The <filename>rc.conf.site</filename> file can then be <para>The <filename>rc.conf</filename> file can then be
distributed to every system using <command>rsync</command> or a distributed to every system using <command>rsync</command> or a
similar program, while the <filename>rc.conf</filename> file similar program, while the <filename>rc.conf.local</filename> file
remains unique.</para> remains unique.</para>
<para>Upgrading the system using &man.sysinstall.8; <para>Upgrading the system using &man.sysinstall.8;
@ -283,6 +280,13 @@
<filename>rc.conf</filename> <filename>rc.conf</filename>
file, so system configuration information will not be lost.</para> file, so system configuration information will not be lost.</para>
<tip>
<para>The <filename>/etc/rc.conf</filename> configuration file
is parsed by &man.sh.1;. This allows system operators to
add a certain amount of logic to this file, which may help to
create very complex configuration scenarios. Please see
&man.rc.conf.5; for further information on this topic.</para>
</tip>
</sect1> </sect1>
<sect1 id="configtuning-appconfig"> <sect1 id="configtuning-appconfig">