Changeset View
Changeset View
Standalone View
Standalone View
share/man/man8/rc.8
Show All 25 Lines | |||||||||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||||||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||||||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||||||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||||||||
.\" | .\" | ||||||||||
.\" @(#)rc.8 8.2 (Berkeley) 12/11/93 | .\" @(#)rc.8 8.2 (Berkeley) 12/11/93 | ||||||||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||||||||
.\" | .\" | ||||||||||
.Dd July 4, 2022 | .Dd June 1, 2023 | ||||||||||
.Dt RC 8 | .Dt RC 8 | ||||||||||
.Os | .Os | ||||||||||
.Sh NAME | .Sh NAME | ||||||||||
.Nm rc | .Nm rc | ||||||||||
.Nd command scripts for auto-reboot and daemon startup | .Nd command scripts for auto-reboot and daemon startup | ||||||||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||||||||
.Nm | .Nm | ||||||||||
.Nm rc.conf | .Nm rc.conf | ||||||||||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||||||||
script. | script. | ||||||||||
.It | .It | ||||||||||
Source | Source | ||||||||||
.Pa /etc/rc.subr | .Pa /etc/rc.subr | ||||||||||
to load various | to load various | ||||||||||
.Xr rc.subr 8 | .Xr rc.subr 8 | ||||||||||
shell functions to use. | shell functions to use. | ||||||||||
.It | .It | ||||||||||
Load the configuration files. | Load the configuration files (see below for reloading). | ||||||||||
debdrup: The parenthetical should be before the period. | |||||||||||
Done Inline Actions
grahamperrin: | |||||||||||
.It | .It | ||||||||||
Determine if booting in a jail, | Determine if booting in a jail, and add | ||||||||||
Done Inline Actions
grahamperrin: | |||||||||||
and add | |||||||||||
.Dq Li nojail | .Dq Li nojail | ||||||||||
(no jails allowed) or | (no jails allowed) or | ||||||||||
.Dq Li nojailvnet | .Dq Li nojailvnet | ||||||||||
(only allow vnet-enabled jails) to the list of KEYWORDS to skip in | (only allow vnet-enabled jails) to the list of KEYWORDS to skip in | ||||||||||
.Xr rcorder 8 . | .Xr rcorder 8 . | ||||||||||
.It | .It | ||||||||||
If the file | If the file | ||||||||||
.Va ${firstboot_sentinel} | .Va ${firstboot_sentinel} | ||||||||||
▲ Show 20 Lines • Show All 226 Lines • ▼ Show 20 Lines | |||||||||||
.Pp | .Pp | ||||||||||
If a script must implement additional commands it can list them in | If a script must implement additional commands it can list them in | ||||||||||
the | the | ||||||||||
.Va extra_commands | .Va extra_commands | ||||||||||
variable, and define their actions in a variable constructed from | variable, and define their actions in a variable constructed from | ||||||||||
the command name (see the | the command name (see the | ||||||||||
.Sx EXAMPLES | .Sx EXAMPLES | ||||||||||
section). | 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 | |||||||||||
Not Done Inline Actions
grahamperrin: | |||||||||||
.Dv SIGALRM | |||||||||||
to the rc process (identified by | |||||||||||
.Ev $RC_PID ) | |||||||||||
to have it re-read the files. | |||||||||||
.Pp | .Pp | ||||||||||
The following key points apply to old-style scripts in | The following key points apply to old-style scripts in | ||||||||||
.Pa /usr/local/etc/rc.d/ : | .Pa /usr/local/etc/rc.d/ : | ||||||||||
.Bl -bullet | .Bl -bullet | ||||||||||
.It | .It | ||||||||||
Scripts are only executed if their | Scripts are only executed if their | ||||||||||
.Xr basename 1 | .Xr basename 1 | ||||||||||
matches the shell globbing pattern | matches the shell globbing pattern | ||||||||||
▲ Show 20 Lines • Show All 205 Lines • Show Last 20 Lines |
The parenthetical should be before the period.