git: 120050663b - main - Add missing paragraph in rc-scripting article

Sergio Carlavilla Delgado <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
The branch main has been updated by carlavilla:

URL: https://cgit.FreeBSD.org/doc/commit/?id=120050663b8dee82c7c2f6d7246392ff0d94ac24

commit 120050663b8dee82c7c2f6d7246392ff0d94ac24
Author:     Rocky Hotas <[email protected]>
AuthorDate: 2021-11-21 20:04:38 +0000
Commit:     Sergio Carlavilla Delgado <[email protected]>
CommitDate: 2021-11-21 20:04:38 +0000

    Add missing paragraph in rc-scripting article
    
    PR:             259832
    Approved by:    carlavilla@
---
 .../content/en/articles/rc-scripting/_index.adoc   | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/documentation/content/en/articles/rc-scripting/_index.adoc b/documentation/content/en/articles/rc-scripting/_index.adoc
index 750072951e..bc939aec04 100644
--- a/documentation/content/en/articles/rc-scripting/_index.adoc
+++ b/documentation/content/en/articles/rc-scripting/_index.adoc
@@ -685,6 +685,29 @@ From all the files to be dependency sorted, man:rcorder[8] will pick only those
 In FreeBSD, man:rcorder[8] is used by [.filename]#/etc/rc# and [.filename]#/etc/rc.shutdown#.
 These two scripts define the standard list of FreeBSD [.filename]#rc.d# keywords and their meanings as follows:
 
+nojail:: The service is not for man:jail[8] environment.
+The automatic startup and shutdown procedures will ignore the script if inside a jail.
+
+nostart:: The service is to be started manually or not started at all.
+The automatic startup procedure will ignore the script.
+In conjunction with the [.filename]#shutdown# keyword, this can be used to write scripts that do something only at system shutdown.
+
+shutdown:: This keyword is to be listed __explicitly__ if the service needs to be stopped before system shutdown.
+
+[NOTE]
+====
+When the system is going to shut down, [.filename]#/etc/rc.shutdown# runs.
+It assumes that most [.filename]#rc.d# scripts have nothing to do at that time.
+Therefore [.filename]#/etc/rc.shutdown# selectively invokes [.filename]#rc.d# scripts with the [.filename]#shutdown# keyword, effectively ignoring the rest of the scripts.
+For even faster shutdown, [.filename]#/etc/rc.shutdown# passes the [.filename]#faststop# 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# runs the scripts in reverse dependency order.
+If writing a real [.filename]#rc.d# script, you should consider whether it is relevant at system shutdown time.
+E.g., if your script does its work in response to the [.filename]#start# command only, then you need not to include this keyword.
+However, if your script manages a service, it is probably a good idea to stop it before the system proceeds to the final stage of its shutdown sequence described in man:halt[8].
+In particular, a service should be stopped explicitly if it needs considerable time or special actions to shut down cleanly.
+A typical example of such a service is a database engine.
+====
+
 [[forcedep]]&#10126; To begin with, `force_depend` should be used with much care.
 It is generally better to revise the hierarchy of configuration variables for your [.filename]#rc.d# scripts if they are interdependent.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.