Polish the part on "shutdown" to make it even more precise

and understandable.
This commit is contained in:
Yaroslav Tykhiy 2007-08-16 13:08:42 +00:00
parent b10930c5f5
commit e1184971b5
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=30652

View file

@ -1140,19 +1140,29 @@ run_rc_command "$1"</programlisting>
<term><literal>shutdown</literal></term> <term><literal>shutdown</literal></term>
<listitem> <listitem>
<para>The script wants to run during system shutdown. <para>This keyword is to be listed
<emphasis>explicitly</emphasis> if the service needs
to be stopped before system shutdown.</para>
<note> <note>
<para>When the system is shut down, <para>When the system is going to shut down,
<filename>/etc/rc.shutdown</filename> runs. It <filename>/etc/rc.shutdown</filename> runs. It
assumes that most <filename>rc.d</filename> scripts assumes that most <filename>rc.d</filename> scripts
have nothing to do at system shutdown time. For have nothing to do at that time. Therefore
faster shutdown, <filename>/etc/rc.shutdown</filename> <filename>/etc/rc.shutdown</filename>
selectively invokes scripts with the selectively invokes <filename>rc.d</filename>
<literal>shutdown</literal> keyword and passes scripts with the <literal>shutdown</literal>
the <option>faststop</option> command to them.</para> keyword, effectively ignoring the
rest of the scripts. For even faster shutdown,
<filename>/etc/rc.shutdown</filename> passes
the <option>faststop</option> command to the scripts
it runs so that they skip preliminary checks, e.g.,
the pidfile check. As dependent services should be
stopped before their prerequisites,
<filename>/etc/rc.shutdown</filename> runs the scripts
in reverse dependency order.</para>
<para>Threrefore, when writing a real <para>If writing a real
<filename>rc.d</filename> script, you should <filename>rc.d</filename> script, you should
consider whether it is relevant at system shutdown consider whether it is relevant at system shutdown
time. E.g., if your script does its work in time. E.g., if your script does its work in