Bring in documentation on rcNG.

Still reviewing:	dougb
This commit is contained in:
Tom Rhodes 2003-05-20 14:48:03 +00:00
parent b28e47038e
commit 663ccb559f
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=16993

View file

@ -417,6 +417,96 @@ exit 0
system boot.</para>
</sect1>
<sect1 id="configtuning-rcNG">
<sect1info>
<authorgroup>
<author>
<firstname>Tom</firstname>
<surname>Rhodes</surname>
<contrib>Contributed by </contrib>
<!-- 16 May 2003 -->
</author>
</authorgroup>
</sect1info>
<title>Using rc under FreeBSD 5.X</title>
<indexterm><primary>rc under FreeBSD 5.X</primary></indexterm>
<para>FreeBSD has recently integrated the NetBSD <filename>rc.d</filename> system,
deprecating the old method. Users will notice the files listed in the
<filename>/etc/rc.d</filename> directory. Many of these files are for basic
services which can be started with the <option>start</option>, <option>stop</option>,
<option>kill</option>, and <option>restart</option> options. For instance, to
restart &man.sshd.8;, the command:</para>
<screen>&prompt.root; <userinput>/etc/rc.d/sshd restart</userinput></screen>
<para>would be issued. This is the basic layout for every service.
Services are not required to be started manually, as they are still called
from the <filename>/etc/rc.conf</filename> file with the basic <option>YES</option>
and <option>NO</option> choices.<para>
<para>As of this writing, the files located in <filename>rc.d</filename> are:</para>
<programlisting>DAEMON devdb kerberos nfsclient rwho
LOGIN devfs keyserv nfsd savecore
NETWORKING dhclient kldxref nfslocking securelevel
SERVERS diskless ldconfig nfsserver sendmail
abi dmesg local nisdomain serial
accounting dumpon localdaemons ntpd sppp
addswap fsck lomac ntpdate sshd
adjkerntz hostname lpd othermta swap1
amd inetd motd pccard syscons
apm initdiskless mountcritlocal pcvt sysctl
apmd initrandom mountcritremote ppp-user syslogd
archdep ip6fw mountd pppoed timed
atm1 ipfilter moused pwcheck ttys
atm2.sh ipfs mroute6d quota usbd
atm3.sh ipfw mrouted random vinum
bgfsck ipmon msgs rarpd virecover
bootparams ipnat named rcconf.sh ypbind
ccd ipsec netif root yppasswdd
cleanvar ipxrouted network1 route6d ypserv
cleartmp isdnd network2 routed ypset
cron jail network3 rpcbind ypupdated
devd kadmind network_ipv6 rtadvd ypxfrd</programlisting>
<para>Most of these are self-explanatory. For instance <filename>sshd</filename> is
used to for the &man.sshd.8; daemon. Other files contribute to system initialization.
For instance, consider the <filename>bgfsck</filename> file. When this script is
executed, it will print out the following message:</para>
<screen>Starting background file system checks in 60 seconds.</screen>
<para>Therefore this file is used for background file system checks, which are
done only during system initialization.</para>
<para>Order of execution is based on a series of words located at the script beginning,
these words are:</para>
<itemizedlist>
<listitem>
<para>PROVIDE: Name of service</para>
</listitem>
<listitem>
<para>REQUIRE: Name of services which may be required for this service to function</para>
</listitem>
<listitem>
<para>BEFORE: What service should be run before this service</para>
</listitem>
<listitem>
<para>KEYWORD: FreeBSD or NetBSD. This is used for *BSD dependent features.</para>
</listitem>
</itemizedlist>
<para>Using this method an administrator can easily control system services without
the hassle of <quote>runlevels</quote> like some other UNIX operating systems.</para>
</sect1>
<sect1 id="config-network-setup">
<sect1info>
<authorgroup>