Polish the part on "shutdown" to make it even more precise
and understandable.
This commit is contained in:
parent
b10930c5f5
commit
e1184971b5
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=30652
1 changed files with 18 additions and 8 deletions
|
@ -1140,19 +1140,29 @@ run_rc_command "$1"</programlisting>
|
|||
<term><literal>shutdown</literal></term>
|
||||
|
||||
<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>
|
||||
<para>When the system is shut down,
|
||||
<para>When the system is going to shut down,
|
||||
<filename>/etc/rc.shutdown</filename> runs. It
|
||||
assumes that most <filename>rc.d</filename> scripts
|
||||
have nothing to do at system shutdown time. For
|
||||
faster shutdown, <filename>/etc/rc.shutdown</filename>
|
||||
selectively invokes scripts with the
|
||||
<literal>shutdown</literal> keyword and passes
|
||||
the <option>faststop</option> command to them.</para>
|
||||
have nothing to do at that time. Therefore
|
||||
<filename>/etc/rc.shutdown</filename>
|
||||
selectively invokes <filename>rc.d</filename>
|
||||
scripts with the <literal>shutdown</literal>
|
||||
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
|
||||
consider whether it is relevant at system shutdown
|
||||
time. E.g., if your script does its work in
|
||||
|
|
Loading…
Reference in a new issue