git: fedfe274225a - stable/12 - rc(8): document how to reload rc's configuration
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 10 Jun 2023 18:26:43 UTC
The branch stable/12 has been updated by grahamperrin: URL: https://cgit.FreeBSD.org/src/commit/?id=fedfe274225a60a9c7e3894b245027caab92470a commit fedfe274225a60a9c7e3894b245027caab92470a Author: Mina Galić <freebsd@igalic.co> AuthorDate: 2023-06-02 18:01:03 +0000 Commit: Graham Perrin <grahamperrin@FreeBSD.org> CommitDate: 2023-06-10 18:23:06 +0000 rc(8): document how to reload rc's configuration The fact that rc(8) only reads its configuration once is in the man page, but how to trigger a reload is only in the code. Discovered while trying to make cloud-init disable and stop syslogd. Thanks to RhodiumToad for providing the words. Reviewed by: debdrup, grahamperrin Approved by: grahamperrin, imp Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D40329 (cherry picked from commit 0981275c75d5678172eb9dd8fbc89ef61c05c979) --- share/man/man8/rc.8 | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/share/man/man8/rc.8 b/share/man/man8/rc.8 index ebd28cd85c2a..ebffeca09d63 100644 --- a/share/man/man8/rc.8 +++ b/share/man/man8/rc.8 @@ -31,7 +31,7 @@ .\" @(#)rc.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd July 4, 2022 +.Dd June 1, 2023 .Dt RC 8 .Os .Sh NAME @@ -124,10 +124,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 @@ -367,6 +366,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