diff options
authorTom Rhodes <trhodes@FreeBSD.org>2003-05-30 21:37:52 +0000
committerTom Rhodes <trhodes@FreeBSD.org>2003-05-30 21:37:52 +0000
commit934ed924553664b983010d33bacb74c63ce957bf (patch)
parent5a0586a7b8fc3ab0dc4dfb5af51e7788032fdb0c (diff)
Add information about the 'force' option. Give the user an example.
Submitted by: "Simon L. Nielsen" <simon@nitro.dk> Reviewed by: bmah
Notes: svn path=/head/; revision=17140
1 files changed, 53 insertions, 0 deletions
diff --git a/en_US.ISO8859-1/books/handbook/config/chapter.sgml b/en_US.ISO8859-1/books/handbook/config/chapter.sgml
index 9f03cd452e..e255b85bda 100644
--- a/en_US.ISO8859-1/books/handbook/config/chapter.sgml
+++ b/en_US.ISO8859-1/books/handbook/config/chapter.sgml
@@ -593,6 +593,55 @@ HOME=/var/log
any other dependent services during the next reboot, as
described below.</para>
+ <para>Since the <filename>rc.d</filename> system is primarily
+ intended to start/stop services at system startup/shutdown time;
+ the standard <option>start</option>,
+ <option>stop</option> and <option>restart</option> options will only
+ perform their action if the appropriate
+ <filename>/etc/rc.conf</filename> variables are set. For
+ instance the above <command>sshd restart</command> command will
+ only work if <varname>sshd_enable</varname> is set to
+ <option>YES</option> in <filename>/etc/rc.conf</filename>. To
+ <option>start</option>, <option>stop</option> or
+ <option>restart</option> a service regardless of the settings in
+ <filename>/etc/rc.conf</filename>, the commands should be
+ prefixed with <quote>force</quote>. For instance to restart
+ <command>sshd</command> regardless of the current
+ <filename>/etc/rc.conf</filename> setting, execute the following
+ command:</para>
+ <screen>&prompt.root; <userinput>/etc/rc.d/sshd forcerestart</userinput></screen>
+ <para>It's easy to check if a service is enabled in
+ <filename>/etc/rc.conf</filename> by running the appropriate
+ <filename>rc.d</filename> script with the option
+ <option>rcvar</option>. Thus, an administrator can check that
+ <command>sshd</command> is in fact enabled in
+ <filename>/etc/rc.conf</filename> by running:</para>
+ <screen>&prompt.root; <userinput>/etc/rc.d/sshd rcvar</userinput>
+# sshd
+ <note>
+ <para>The second line (<literal># sshd</literal>) is the output
+ from the <command>sshd</command> command; not a <username>root</username>
+ console.</para>
+ </note>
+ <para>To determine if a service is running, a
+ <option>status</option> option is available. For instance to
+ verify that <command>sshd</command> is actually started:</para>
+ <screen>&prompt.root; <userinput>/etc/rc.d/sshd status</userinput>
+sshd is running as pid 433.</screen>
+ <para>It is also possible to <option>reload</option> a service.
+ This will attempt to send a signal to an individual service, forcing the
+ service to reload its configuration files. In most cases this
+ means sending the service a <literal>SIGHUP</literal>
+ signal.</para>
<para>The <application>rcNG</application> structure is not only used for network services, it also
contributes to most of the system initialization. For
instance, consider the <filename>bgfsck</filename> file. When
@@ -637,6 +686,10 @@ HOME=/var/log
<para>By using this method, an administrator can easily control system
services without the hassle of <quote>runlevels</quote> like
some other &unix; operating systems.</para>
+ <para>Additional information about the &os; 5.X
+ <filename>rc.d</filename> system can be found in the &man.rc.8;
+ and &man.rc.subr.8; manual pages.</para>
<sect1 id="config-network-setup">