Begin the rc.d script RE task by adding information on how to invoke

some scripts from rc.conf and provide an example.

Snip some old information about rc.local and FreeBSD 3.1.
This commit is contained in:
Tom Rhodes 2004-08-31 21:57:41 +00:00
parent 2f98d4045d
commit 74bf617fd5
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=22196

View file

@ -338,13 +338,10 @@
This is the recommended way for
starting system-wide services that are to be run as
<username>root</username>, or that
expect to be started as <username>root</username>.
These scripts are registered as
part of the installation of the package, and will be removed
when the package is removed.</para>
expect to be started as <username>root</username>.</para>
<para>A generic startup script in
<filename>/usr/local/etc/rc.d</filename> looks like:</para>
<filename>/usr/local/etc/rc.d</filename> looks similar to:</para>
<programlisting>#!/bin/sh
echo -n ' FooBar'
@ -380,26 +377,26 @@ exit 0
<screen>&prompt.root; <userinput>chmod 755 <replaceable>FooBar.sh</replaceable></userinput></screen>
<para>This convention does not always apply; however, as
&os;&nbsp;5.X progresses, the method of starting software has
slowly been merged into the <filename>rc.conf</filename> file.
For instance, to start the
<filename role="port">www/apache13</filename> web server during
system initialization, append the following line to the
<filename>rc.conf</filename> file:</para>
<programlisting>apache_enable="YES"</programlisting>
<para>Some services expect to be invoked by &man.inetd.8; when a
connection is received on a suitable port. This is common for
mail reader servers (POP and IMAP, etc.). These services are
enabled by editing the file <filename>/etc/inetd.conf</filename>.
See &man.inetd.8; for details on editing this file.</para>
<para>Some additional system services may not be covered by the
toggles in <filename>/etc/rc.conf</filename>. These are
traditionally enabled by placing the command(s) to invoke them
in <filename>/etc/rc.local</filename>. As of &os;&nbsp;3.1 there
is no default <filename>/etc/rc.local</filename>; if it is
created by the administrator it will however be honored in the
normal fashion. Note that <filename>rc.local</filename> is
generally regarded as the location of last resort; if there is a
better place to start a service, do it there.</para>
<note><para>Do <emphasis>not</emphasis> place any commands in
<filename>/etc/rc.conf</filename>. To start daemons, or
run any commands at boot time, place a script in
<filename>/usr/local/etc/rc.d</filename> instead.</para>
<filename>/usr/local/etc/rc.d</filename> or <filename role="directory">/etc/rc.d</filename> instead.</para>
</note>
<para>It is also possible to use the &man.cron.8; daemon to start