aboutsummaryrefslogtreecommitdiff
path: root/share/man/man8/rc.8
diff options
context:
space:
mode:
Diffstat (limited to 'share/man/man8/rc.8')
-rw-r--r--share/man/man8/rc.853
1 files changed, 27 insertions, 26 deletions
diff --git a/share/man/man8/rc.8 b/share/man/man8/rc.8
index 8b6fc094b7db..b7bd7b2de1f0 100644
--- a/share/man/man8/rc.8
+++ b/share/man/man8/rc.8
@@ -28,10 +28,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)rc.8 8.2 (Berkeley) 12/11/93
-.\" $FreeBSD$
-.\"
-.Dd July 4, 2022
+.Dd September 20, 2024
.Dt RC 8
.Os
.Sh NAME
@@ -124,10 +121,9 @@ to load various
.Xr rc.subr 8
shell functions to use.
.It
-Load the configuration files.
+Load the configuration files (see below for reloading).
.It
-Determine if booting in a jail,
-and add
+Determine if booting in a jail, and add
.Dq Li nojail
(no jails allowed) or
.Dq Li nojailvnet
@@ -152,9 +148,13 @@ KEYWORD (refer to
.Fl s
flag).
.It
-Call each script in turn using
+Call
+.Fn run_rc_scripts
+with the list of scripts to be run.
+.Pp
+For each script that will call
.Fn run_rc_script
-(from
+(both functions are from
.Xr rc.subr 8 ) ,
which sets
.Va $1
@@ -175,9 +175,11 @@ Re-run
this time including the scripts in the
.Va $local_startup
directories.
-Ignore everything up to the
-.Va $early_late_divider ,
-then start executing the scripts as described above.
+Call
+.Fn run_rc_scripts
+again with the new list of scripts.
+It will skip any that have already been run and
+execute the rest as described above.
.It
If the file
.Va ${firstboot_sentinel}
@@ -371,6 +373,17 @@ the command name (see the
.Sx EXAMPLES
section).
.Pp
+The configuration files are normally read only once at the start of a boot
+sequence; if a script needs to
+.Cm enable
+or
+.Cm disable
+any other script that would run later in the sequence, it must send a
+.Dv SIGALRM
+to the rc process (identified by
+.Ev $RC_PID )
+to have it re-read the files.
+.Pp
The following key points apply to old-style scripts in
.Pa /usr/local/etc/rc.d/ :
.Bl -bullet
@@ -438,18 +451,6 @@ is not set, when going from single-user to multi-user mode for example,
the script does not do anything.
.Pp
The
-.Pa /etc/rc.d/local
-script can execute scripts from multiple
-.Nm rc.d/
-directories.
-The default location includes
-.Pa /usr/local/etc/rc.d/ ,
-but these may be overridden with the
-.Va local_startup
-.Xr rc.conf 5
-variable.
-.Pp
-The
.Pa /etc/rc.d/serial
script is used to set any special configurations for serial devices.
.Pp
@@ -575,8 +576,8 @@ is unnecessary, but is often included.
.Xr sysrc 8
.Pp
.Rs
-.%T "Practical rc.d scripting in BSD"
-.%U "https://docs.freebsd.org/en/articles/rc-scripting/"
+.%T Practical rc.d scripting in BSD
+.%U <https://docs.freebsd.org/en/articles/rc-scripting/>
.Re
.Sh HISTORY
The