Add some text describing the "include" kernel configuration directive,
and give an example. In practice, including GENERIC and then simply providing a few additional options or devices is the preferred way to configure kernels now, rather than writing them from scratch (except in embedded environments). This text could probably use some refinement. Suggested by: Richard Clayton <richard.clayton at cl.cam.ac.uk>
This commit is contained in:
parent
cf1dd0e5d7
commit
f33d7f0e8d
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=34273
1 changed files with 28 additions and 0 deletions
|
@ -497,6 +497,34 @@ following line in &man.loader.conf.5:
|
|||
architecture independent options, see
|
||||
<filename>/usr/src/sys/conf/NOTES</filename>.</para>
|
||||
|
||||
<para>As of &os; 5.0, a new <literal>include</literal> directive is
|
||||
available for use in configuration files. This allows another
|
||||
configuration file to be logically included in the current one, making
|
||||
it easy to maintain small changes relative to an existing file. For
|
||||
example, if you require a <filename>GENERIC</filename> kernel with
|
||||
only a small number of additional options or drivers, this allows you
|
||||
to maintain only a delta with respect to GENERIC:</para>
|
||||
|
||||
<programlisting>include GENERIC
|
||||
ident MYKERNEL
|
||||
|
||||
options IPFIREWALL
|
||||
options DUMMYNET
|
||||
options IPFIREWALL_DEFAULT_TO_ACCEPT
|
||||
options IPDIVERT
|
||||
</programlisting>
|
||||
|
||||
<para>Many administrators will find that this model offers significant
|
||||
benefits over the historic writing of configuration files from scratch:
|
||||
the local configuration file will express only local differences from
|
||||
a <filename>GENERIC</filename> kernel and as upgrades are performed,
|
||||
new features added to <filename>GENERIC</filename> will be added to the
|
||||
local kernel unless specifically prevented using
|
||||
<literal>nooptions</literal> or <literal>nodevice</literal>. The
|
||||
remainder of this chapter addresses the contents of a typical
|
||||
configuration file and the role various options and devices
|
||||
play.</para>
|
||||
|
||||
<note>
|
||||
<para>To build a file which contains all available options,
|
||||
as normally done for testing purposes, run the following
|
||||
|
|
Loading…
Reference in a new issue