2004-02-27 10:20:22 +00:00
|
|
|
.\" $NetBSD: rc.subr.8,v 1.12 2004/01/06 00:52:24 lukem Exp $
|
2002-11-21 20:12:05 +00:00
|
|
|
.\"
|
2004-02-27 10:20:22 +00:00
|
|
|
.\" Copyright (c) 2002-2004 The NetBSD Foundation, Inc.
|
2002-11-21 20:12:05 +00:00
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" This code is derived from software contributed to The NetBSD Foundation
|
|
|
|
.\" by Luke Mewburn.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by the NetBSD
|
|
|
|
.\" Foundation, Inc. and its contributors.
|
|
|
|
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
|
|
.\" contributors may be used to endorse or promote products derived
|
|
|
|
.\" from this software without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
|
|
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
|
|
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
.\" CONTRACT, STRICT 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 SUCH DAMAGE.
|
|
|
|
.\"
|
2004-07-09 10:08:03 +00:00
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2004-02-27 10:20:22 +00:00
|
|
|
.Dd January 6, 2004
|
2002-11-21 20:12:05 +00:00
|
|
|
.Dt RC.SUBR 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm rc.subr
|
|
|
|
.Nd functions used by system shell scripts
|
|
|
|
.Sh SYNOPSIS
|
2004-07-09 10:08:03 +00:00
|
|
|
.Bl -item -compact
|
2002-11-21 20:12:05 +00:00
|
|
|
.It
|
2004-07-09 10:08:03 +00:00
|
|
|
.Ic .\& Pa /etc/rc.subr
|
|
|
|
.Pp
|
2002-11-21 20:12:05 +00:00
|
|
|
.It
|
|
|
|
.Ic backup_file Ar action Ar file Ar current Ar backup
|
|
|
|
.It
|
|
|
|
.Ic checkyesno Ar var
|
|
|
|
.It
|
|
|
|
.Ic check_pidfile Ar pidfile Ar procname Op Ar interpreter
|
|
|
|
.It
|
|
|
|
.Ic check_process Ar procname Op Ar interpreter
|
|
|
|
.It
|
|
|
|
.Ic debug Ar message
|
|
|
|
.It
|
|
|
|
.Ic err Ar exitval Ar message
|
|
|
|
.It
|
|
|
|
.Ic force_depend Ar name
|
|
|
|
.It
|
|
|
|
.Ic info Ar message
|
|
|
|
.It
|
|
|
|
.Ic load_rc_config Ar command
|
|
|
|
.It
|
|
|
|
.Ic mount_critical_filesystems Ar type
|
|
|
|
.It
|
2004-07-09 10:08:03 +00:00
|
|
|
.Ic rc_usage Ar command ...
|
2002-11-21 20:12:05 +00:00
|
|
|
.It
|
2004-07-09 10:08:03 +00:00
|
|
|
.Ic reverse_list Ar item ...
|
2002-11-21 20:12:05 +00:00
|
|
|
.It
|
|
|
|
.Ic run_rc_command Ar argument
|
|
|
|
.It
|
|
|
|
.Ic run_rc_script Ar file Ar argument
|
|
|
|
.It
|
|
|
|
.Ic set_rcvar Op Ar base
|
|
|
|
.It
|
2004-07-09 10:08:03 +00:00
|
|
|
.Ic wait_for_pids Op Ar pid ...
|
2002-11-21 20:12:05 +00:00
|
|
|
.It
|
|
|
|
.Ic warn Ar message
|
|
|
|
.El
|
|
|
|
.Sh DESCRIPTION
|
2004-07-09 10:08:03 +00:00
|
|
|
The
|
2002-11-21 20:12:05 +00:00
|
|
|
.Nm
|
2004-07-09 10:08:03 +00:00
|
|
|
script
|
2002-11-21 20:12:05 +00:00
|
|
|
contains commonly used shell script functions and variable
|
|
|
|
definitions which are used by various scripts such as
|
|
|
|
.Xr rc 8 .
|
|
|
|
Scripts required by ports in
|
|
|
|
.Pa /usr/local/etc/rc.d
|
|
|
|
will also eventually
|
|
|
|
be rewritten to make use of it.
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
functions were mostly imported from
|
2002-12-27 12:15:40 +00:00
|
|
|
.Nx
|
2002-11-21 20:12:05 +00:00
|
|
|
and it is intended that they remain synced between the
|
2004-07-03 18:29:24 +00:00
|
|
|
two projects.
|
|
|
|
With that in mind there are several variable
|
|
|
|
definitions that can help in this regard.
|
|
|
|
They are:
|
2002-11-21 20:12:05 +00:00
|
|
|
.Bl -tag -width 4n
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va OSTYPE
|
2002-11-21 20:12:05 +00:00
|
|
|
Its value will be either
|
2004-07-09 10:08:03 +00:00
|
|
|
.Qq Li FreeBSD
|
2002-11-21 20:12:05 +00:00
|
|
|
or
|
2004-07-09 10:08:03 +00:00
|
|
|
.Qq Li NetBSD ,
|
2002-11-21 20:12:05 +00:00
|
|
|
depending on which OS it is running on.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va SYSCTL
|
2002-11-21 20:12:05 +00:00
|
|
|
The path to the
|
|
|
|
.Xr sysctl 8
|
|
|
|
command.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va SYSCTL_N
|
2002-11-21 20:12:05 +00:00
|
|
|
The path and argument list to display only the
|
|
|
|
.Xr sysctl 8
|
2004-07-09 10:08:03 +00:00
|
|
|
values instead of a
|
|
|
|
.Ar name Ns = Ns Ar value
|
|
|
|
pair.
|
|
|
|
.It Va SYSCTL_W
|
2002-11-21 20:12:05 +00:00
|
|
|
The path and argument to write or modify
|
|
|
|
.Xr sysctl 8
|
|
|
|
values.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
functions are accessed by sourcing
|
|
|
|
.Pa /etc/rc.subr
|
|
|
|
into the current shell.
|
|
|
|
.Pp
|
|
|
|
The following shell functions are available:
|
|
|
|
.Bl -tag -width 4n
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Ic backup_file Ar action file current backup
|
2002-11-21 20:12:05 +00:00
|
|
|
Make a backup copy of
|
|
|
|
.Ar file
|
|
|
|
into
|
|
|
|
.Ar current .
|
|
|
|
If the
|
|
|
|
.Xr rc.conf 5
|
|
|
|
variable
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va backup_uses_rcs
|
2002-11-21 20:12:05 +00:00
|
|
|
is
|
2004-07-09 10:08:03 +00:00
|
|
|
.Dq Li YES ,
|
2002-11-21 20:12:05 +00:00
|
|
|
use
|
|
|
|
.Xr rcs 1
|
|
|
|
to archive the previous version of
|
|
|
|
.Ar current ,
|
|
|
|
otherwise save the previous version of
|
|
|
|
.Ar current
|
|
|
|
as
|
|
|
|
.Ar backup .
|
|
|
|
.Pp
|
2004-07-09 10:08:03 +00:00
|
|
|
The
|
2002-11-21 20:12:05 +00:00
|
|
|
.Ar action
|
2004-07-09 10:08:03 +00:00
|
|
|
argument
|
2002-11-21 20:12:05 +00:00
|
|
|
may be one of the following:
|
2004-07-09 10:08:03 +00:00
|
|
|
.Bl -tag -width ".Cm remove"
|
|
|
|
.It Cm add
|
2002-11-21 20:12:05 +00:00
|
|
|
.Ar file
|
|
|
|
is now being backed up by or possibly re-entered into this backup mechanism.
|
|
|
|
.Ar current
|
|
|
|
is created, and if necessary, the
|
|
|
|
.Xr rcs 1
|
|
|
|
files are created as well.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Cm update
|
2002-11-21 20:12:05 +00:00
|
|
|
.Ar file
|
|
|
|
has changed and needs to be backed up.
|
|
|
|
If
|
|
|
|
.Ar current
|
|
|
|
exists, it is copied to
|
|
|
|
.Ar backup
|
|
|
|
or checked into
|
|
|
|
.Xr rcs 1
|
|
|
|
(if the repository file is old),
|
|
|
|
and then
|
|
|
|
.Ar file
|
|
|
|
is copied to
|
|
|
|
.Ar current .
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Cm remove
|
2002-11-21 20:12:05 +00:00
|
|
|
.Ar file
|
|
|
|
is no longer being tracked by this backup mechanism.
|
|
|
|
If
|
|
|
|
.Xr rcs 1
|
|
|
|
is being used, an empty file is checked in and
|
|
|
|
.Ar current
|
|
|
|
is removed,
|
|
|
|
otherwise
|
|
|
|
.Ar current
|
|
|
|
is moved to
|
|
|
|
.Ar backup .
|
|
|
|
.El
|
|
|
|
.It Ic checkyesno Ar var
|
|
|
|
Return 0 if
|
|
|
|
.Ar var
|
|
|
|
is defined to
|
2004-07-09 10:08:03 +00:00
|
|
|
.Dq Li YES ,
|
|
|
|
.Dq Li TRUE ,
|
|
|
|
.Dq Li ON ,
|
2002-11-21 20:12:05 +00:00
|
|
|
or
|
2004-07-09 10:08:03 +00:00
|
|
|
.Ql 1 .
|
2002-11-21 20:12:05 +00:00
|
|
|
Return 1 if
|
|
|
|
.Ar var
|
|
|
|
is defined to
|
2004-07-09 10:08:03 +00:00
|
|
|
.Dq Li NO ,
|
|
|
|
.Dq Li FALSE ,
|
|
|
|
.Dq Li OFF ,
|
2002-11-21 20:12:05 +00:00
|
|
|
or
|
2004-07-09 10:08:03 +00:00
|
|
|
.Ql 0 .
|
2002-11-21 20:12:05 +00:00
|
|
|
Otherwise, warn that
|
|
|
|
.Ar var
|
|
|
|
is not set correctly.
|
|
|
|
The values are case insensitive.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Ic check_pidfile Ar pidfile procname Op Ar interpreter
|
2002-11-21 20:12:05 +00:00
|
|
|
Parses the first word of the first line of
|
|
|
|
.Ar pidfile
|
|
|
|
for a PID, and ensures that the process with that PID
|
|
|
|
is running and its first argument matches
|
|
|
|
.Ar procname .
|
2004-02-27 10:20:22 +00:00
|
|
|
Prints the matching PID if successful, otherwise nothing.
|
2002-11-21 20:12:05 +00:00
|
|
|
If
|
|
|
|
.Ar interpreter
|
|
|
|
is provided, parse the first line of
|
|
|
|
.Ar procname ,
|
|
|
|
ensure that the line is of the form
|
2004-07-09 10:08:03 +00:00
|
|
|
.Pp
|
|
|
|
.Dl "#! interpreter [...]"
|
|
|
|
.Pp
|
2002-11-21 20:12:05 +00:00
|
|
|
and use
|
|
|
|
.Ar interpreter
|
|
|
|
with its optional arguments and
|
|
|
|
.Ar procname
|
|
|
|
appended as the process string to search for.
|
|
|
|
.It Ic check_process Ar procname Op Ar interpreter
|
|
|
|
Prints the PIDs of any processes that are running with a first
|
|
|
|
argument that matches
|
|
|
|
.Ar procname .
|
|
|
|
.Ar interpreter
|
|
|
|
is handled as per
|
|
|
|
.Ic check_pidfile .
|
|
|
|
.It Ic debug Ar message
|
|
|
|
Display a debugging message to
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va stderr ,
|
2002-11-21 20:12:05 +00:00
|
|
|
log it to the system log using
|
|
|
|
.Xr logger 1 ,
|
|
|
|
and
|
|
|
|
return to the caller.
|
2002-12-27 12:15:40 +00:00
|
|
|
The error message consists of the script name
|
2002-11-21 20:12:05 +00:00
|
|
|
(from
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va $0 ) ,
|
2002-11-21 20:12:05 +00:00
|
|
|
followed by
|
2004-07-09 10:08:03 +00:00
|
|
|
.Dq Li ": DEBUG: " ,
|
2002-11-21 20:12:05 +00:00
|
|
|
and then
|
|
|
|
.Ar message .
|
|
|
|
This function is intended to be used by developers
|
2004-07-03 18:29:24 +00:00
|
|
|
as an aid to debugging scripts.
|
|
|
|
It can be turned on or off
|
2002-11-21 20:12:05 +00:00
|
|
|
by the
|
|
|
|
.Xr rc.conf 5
|
|
|
|
variable
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va rc_debug .
|
|
|
|
.It Ic err Ar exitval message
|
2002-11-21 20:12:05 +00:00
|
|
|
Display an error message to
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va stderr ,
|
2002-11-21 20:12:05 +00:00
|
|
|
log it to the system log
|
|
|
|
using
|
|
|
|
.Xr logger 1 ,
|
|
|
|
and
|
2004-07-09 10:08:03 +00:00
|
|
|
.Ic exit
|
2002-11-21 20:12:05 +00:00
|
|
|
with an exit value of
|
|
|
|
.Ar exitval .
|
|
|
|
The error message consists of the script name
|
|
|
|
(from
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va $0 ) ,
|
2002-11-21 20:12:05 +00:00
|
|
|
followed by
|
2004-07-09 10:08:03 +00:00
|
|
|
.Dq Li ": ERROR: " ,
|
2002-11-21 20:12:05 +00:00
|
|
|
and then
|
|
|
|
.Ar message .
|
|
|
|
.It Ic force_depend name
|
|
|
|
Output an advisory message and force the
|
|
|
|
.Ar name
|
2004-07-03 18:29:24 +00:00
|
|
|
service to start.
|
|
|
|
The
|
2002-11-21 20:12:05 +00:00
|
|
|
.Ar name
|
|
|
|
argument is the
|
2004-07-09 10:08:03 +00:00
|
|
|
.Xr basename 1
|
2002-11-21 20:12:05 +00:00
|
|
|
component of the path to the script, usually
|
2004-07-09 10:08:03 +00:00
|
|
|
.Pa /etc/rc.d/name .
|
2002-11-21 20:12:05 +00:00
|
|
|
If the script fails for any reason it will output a warning
|
2004-07-03 18:29:24 +00:00
|
|
|
and return with a return value of 1.
|
|
|
|
If it was successful
|
2002-11-21 20:12:05 +00:00
|
|
|
it will return 0.
|
|
|
|
.It Ic info Ar message
|
|
|
|
Display an informational message to
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va stdout ,
|
2002-11-21 20:12:05 +00:00
|
|
|
and log it to the system log using
|
|
|
|
.Xr logger 1 .
|
|
|
|
The message consists of the script name
|
|
|
|
(from
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va $0 ) ,
|
2002-11-21 20:12:05 +00:00
|
|
|
followed by
|
2004-07-09 10:08:03 +00:00
|
|
|
.Dq Li ": INFO: " ,
|
2002-11-21 20:12:05 +00:00
|
|
|
and then
|
2002-12-27 12:15:40 +00:00
|
|
|
.Ar message .
|
2002-11-21 20:12:05 +00:00
|
|
|
The display of this informational output can be
|
|
|
|
turned on or off by the
|
|
|
|
.Xr rc.conf 5
|
|
|
|
variable
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va rc_info .
|
2002-11-21 20:12:05 +00:00
|
|
|
.It Ic load_rc_config Ar command
|
|
|
|
Source in the configuration files for
|
|
|
|
.Ar command .
|
|
|
|
First,
|
|
|
|
.Pa /etc/rc.conf
|
|
|
|
is sourced if it has not yet been read in.
|
|
|
|
Then,
|
|
|
|
.Pa /etc/rc.conf.d/ Ns Ar command
|
|
|
|
is sourced if it is an existing file.
|
|
|
|
The latter may also contain other variable assignments to override
|
|
|
|
.Ic run_rc_command
|
|
|
|
arguments defined by the calling script, to provide an easy
|
|
|
|
mechanism for an administrator to override the behaviour of a given
|
|
|
|
.Xr rc.d 8
|
|
|
|
script without requiring the editing of that script.
|
|
|
|
.It Ic mount_critical_filesystems Ar type
|
|
|
|
Go through a list of critical file systems,
|
|
|
|
as found in the
|
|
|
|
.Xr rc.conf 5
|
|
|
|
variable
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va critical_filesystems_ Ns Ar type ,
|
2002-11-21 20:12:05 +00:00
|
|
|
mounting each one that
|
|
|
|
is not currently mounted.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Ic rc_usage Ar command ...
|
2002-11-21 20:12:05 +00:00
|
|
|
Print a usage message for
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va $0 ,
|
2002-11-21 20:12:05 +00:00
|
|
|
with
|
|
|
|
.Ar commands
|
|
|
|
being the list of valid arguments
|
|
|
|
prefixed by
|
2004-07-09 10:08:03 +00:00
|
|
|
.Sm off
|
|
|
|
.Dq Bq Li fast | force | one .
|
|
|
|
.Sm on
|
|
|
|
.It Ic reverse_list Ar item ...
|
2002-11-21 20:12:05 +00:00
|
|
|
Print the list of
|
|
|
|
.Ar items
|
|
|
|
in reverse order.
|
|
|
|
.It Ic run_rc_command Ar argument
|
|
|
|
Run the
|
|
|
|
.Ar argument
|
|
|
|
method for the current
|
|
|
|
.Xr rc.d 8
|
|
|
|
script, based on the settings of various shell variables.
|
|
|
|
.Ic run_rc_command
|
|
|
|
is extremely flexible, and allows fully functional
|
|
|
|
.Xr rc.d 8
|
|
|
|
scripts to be implemented in a small amount of shell code.
|
|
|
|
.Pp
|
|
|
|
.Ar argument
|
|
|
|
is searched for in the list of supported commands, which may be one
|
|
|
|
of:
|
2004-07-09 10:08:03 +00:00
|
|
|
.Bl -tag -width ".Cm restart" -offset indent
|
|
|
|
.It Cm start
|
2004-02-27 10:20:22 +00:00
|
|
|
Start the service.
|
|
|
|
This should check that the service is to be started as specified by
|
|
|
|
.Xr rc.conf 5 .
|
|
|
|
Also checks if the service is already running and refuses to start if
|
|
|
|
it is.
|
|
|
|
This latter check is not performed by standard
|
|
|
|
.Fx
|
|
|
|
scripts if the system is starting directly to multi-user mode, to
|
|
|
|
speed up the boot process.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Cm stop
|
2004-02-27 10:20:22 +00:00
|
|
|
If the service is to be started as specified by
|
|
|
|
.Xr rc.conf 5 ,
|
|
|
|
stop the service.
|
2004-07-09 10:08:03 +00:00
|
|
|
This should check that the service is running and complain if it is not.
|
|
|
|
.It Cm restart
|
2004-02-27 10:20:22 +00:00
|
|
|
Perform a
|
2004-07-09 10:08:03 +00:00
|
|
|
.Cm stop
|
2004-02-27 10:20:22 +00:00
|
|
|
then a
|
2004-07-09 10:08:03 +00:00
|
|
|
.Cm start .
|
2004-02-27 10:20:22 +00:00
|
|
|
Defaults to displaying the process ID of the program (if running).
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Cm rcvar
|
2004-02-27 10:20:22 +00:00
|
|
|
Display which
|
|
|
|
.Xr rc.conf 5
|
|
|
|
variables are used to control the startup of the service (if any).
|
|
|
|
.El
|
|
|
|
.Pp
|
2002-11-21 20:12:05 +00:00
|
|
|
If
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va pidfile
|
2002-11-21 20:12:05 +00:00
|
|
|
or
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va procname
|
2004-02-27 10:20:22 +00:00
|
|
|
is set, also support:
|
2004-07-09 10:08:03 +00:00
|
|
|
.Bl -tag -width ".Cm restart" -offset indent
|
|
|
|
.It Cm poll
|
2004-02-27 10:20:22 +00:00
|
|
|
Wait for the command to exit.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Cm status
|
2004-02-27 10:20:22 +00:00
|
|
|
Show the status of the process.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Other supported commands are listed in the optional variable
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va extra_commands .
|
2002-11-21 20:12:05 +00:00
|
|
|
.Pp
|
|
|
|
.Ar argument
|
|
|
|
may have one of the following prefixes which alters its operation:
|
2004-07-09 10:08:03 +00:00
|
|
|
.Bl -tag -width ".Li force" -offset indent
|
|
|
|
.It Li fast
|
2002-11-21 20:12:05 +00:00
|
|
|
Skip the check for an existing running process,
|
|
|
|
and sets
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va rc_fast Ns = Ns Li YES .
|
|
|
|
.It Li force
|
2002-11-21 20:12:05 +00:00
|
|
|
Skip the checks for
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va rcvar
|
|
|
|
being set to
|
|
|
|
.Dq Li YES ,
|
2002-11-21 20:12:05 +00:00
|
|
|
and sets
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va rc_force Ns = Ns Li YES .
|
2002-11-21 20:12:05 +00:00
|
|
|
This ignores
|
2004-07-09 10:08:03 +00:00
|
|
|
.Ar argument Ns Va _precmd
|
2002-11-21 20:12:05 +00:00
|
|
|
returning non-zero, and ignores any of the
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va required_*
|
2004-02-27 10:20:22 +00:00
|
|
|
tests failing, and always returns a zero exit status.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Li one
|
2004-02-27 10:20:22 +00:00
|
|
|
Skip the checks for
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va rcvar
|
|
|
|
being set to
|
|
|
|
.Dq Li YES ,
|
|
|
|
but performs all the other prerequisite tests.
|
2002-11-21 20:12:05 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
.Ic run_rc_command
|
|
|
|
uses the following shell variables to control its behaviour.
|
|
|
|
Unless otherwise stated, these are optional.
|
2004-07-09 10:08:03 +00:00
|
|
|
.Bl -tag -width ".Va procname" -offset indent
|
|
|
|
.It Va name
|
2002-11-21 20:12:05 +00:00
|
|
|
The name of this script.
|
|
|
|
This is not optional.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va rcvar
|
2002-11-21 20:12:05 +00:00
|
|
|
The value of
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va rcvar
|
2002-11-21 20:12:05 +00:00
|
|
|
is checked with
|
|
|
|
.Ic checkyesno
|
|
|
|
to determine if this method should be run.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va command
|
2002-11-21 20:12:05 +00:00
|
|
|
Full path to the command.
|
|
|
|
Not required if
|
2004-07-09 10:08:03 +00:00
|
|
|
.Ar argument Ns Va _cmd
|
2002-11-21 20:12:05 +00:00
|
|
|
is defined for each supported keyword.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va command_args
|
2002-11-21 20:12:05 +00:00
|
|
|
Optional arguments and/or shell directives for
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va command .
|
|
|
|
.It Va command_interpreter
|
|
|
|
.Va command
|
2002-11-21 20:12:05 +00:00
|
|
|
is started with
|
2004-07-09 10:08:03 +00:00
|
|
|
.Pp
|
|
|
|
.Dl "#! command_interpreter [...]"
|
2002-11-21 20:12:05 +00:00
|
|
|
which results in its
|
|
|
|
.Xr ps 1
|
|
|
|
command being
|
2004-07-09 10:08:03 +00:00
|
|
|
.Pp
|
|
|
|
.Dl "command_interpreter [...] command"
|
|
|
|
.Pp
|
2002-11-21 20:12:05 +00:00
|
|
|
so use that string to find the PID(s) of the running command
|
|
|
|
rather than
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va command .
|
|
|
|
.It Va extra_commands
|
2002-11-21 20:12:05 +00:00
|
|
|
Extra commands/keywords/arguments supported.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va pidfile
|
|
|
|
Path to PID file.
|
2002-11-21 20:12:05 +00:00
|
|
|
Used to determine the PID(s) of the running command.
|
|
|
|
If
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va pidfile
|
2002-11-21 20:12:05 +00:00
|
|
|
is set, use
|
2004-07-09 10:08:03 +00:00
|
|
|
.Pp
|
|
|
|
.Dl "check_pidfile $pidfile $procname"
|
|
|
|
.Pp
|
2002-11-21 20:12:05 +00:00
|
|
|
to find the PID.
|
|
|
|
Otherwise, if
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va command
|
2002-11-21 20:12:05 +00:00
|
|
|
is set, use
|
2004-07-09 10:08:03 +00:00
|
|
|
.Pp
|
|
|
|
.Dl "check_process $procname"
|
|
|
|
.Pp
|
2002-11-21 20:12:05 +00:00
|
|
|
to find the PID.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va procname
|
2002-11-21 20:12:05 +00:00
|
|
|
Process name to check for.
|
|
|
|
Defaults to the value of
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va command .
|
|
|
|
.It Va required_dirs
|
2002-11-21 20:12:05 +00:00
|
|
|
Check for the existence of the listed directories
|
|
|
|
before running the default start method.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va required_files
|
2002-11-21 20:12:05 +00:00
|
|
|
Check for the readability of the listed files
|
|
|
|
before running the default start method.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va required_vars
|
2002-11-21 20:12:05 +00:00
|
|
|
Perform
|
|
|
|
.Ic checkyesno
|
|
|
|
on each of the list variables
|
|
|
|
before running the default start method.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va ${name}_chdir
|
2002-11-21 20:12:05 +00:00
|
|
|
Directory to
|
|
|
|
.Ic cd
|
|
|
|
to before running
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va command ,
|
2002-11-21 20:12:05 +00:00
|
|
|
if
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va ${name}_chroot
|
2002-11-21 20:12:05 +00:00
|
|
|
is not provided.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va ${name}_chroot
|
2002-11-21 20:12:05 +00:00
|
|
|
Directory to
|
|
|
|
.Xr chroot 8
|
|
|
|
to before running
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va command .
|
2002-11-21 20:12:05 +00:00
|
|
|
Only supported after
|
|
|
|
.Pa /usr
|
|
|
|
is mounted.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va ${name}_flags
|
2002-11-21 20:12:05 +00:00
|
|
|
Arguments to call
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va command
|
2002-11-21 20:12:05 +00:00
|
|
|
with.
|
|
|
|
This is usually set in
|
|
|
|
.Xr rc.conf 5 ,
|
|
|
|
and not in the
|
|
|
|
.Xr rc.d 8
|
|
|
|
script.
|
|
|
|
The environment variable
|
|
|
|
.Sq Ev flags
|
|
|
|
can be used to override this.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va ${name}_nice
|
2002-11-21 20:12:05 +00:00
|
|
|
.Xr nice 1
|
|
|
|
level to run
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va command
|
2002-11-21 20:12:05 +00:00
|
|
|
as.
|
|
|
|
Only supported after
|
|
|
|
.Pa /usr
|
|
|
|
is mounted.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va ${name}_user
|
2002-11-21 20:12:05 +00:00
|
|
|
User to run
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va command
|
2002-11-21 20:12:05 +00:00
|
|
|
as, using
|
|
|
|
.Xr chroot 8 .
|
|
|
|
if
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va ${name}_chroot
|
2002-11-21 20:12:05 +00:00
|
|
|
is set, otherwise
|
|
|
|
uses
|
|
|
|
.Xr su 1 .
|
|
|
|
Only supported after
|
|
|
|
.Pa /usr
|
|
|
|
is mounted.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va ${name}_group
|
2002-11-21 20:12:05 +00:00
|
|
|
Group to run the chrooted
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va command
|
2002-11-21 20:12:05 +00:00
|
|
|
as.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va ${name}_groups
|
2002-11-21 20:12:05 +00:00
|
|
|
Comma separated list of supplementary groups to run the chrooted
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va command
|
2002-11-21 20:12:05 +00:00
|
|
|
with.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Ar argument Ns Va _cmd
|
2002-11-21 20:12:05 +00:00
|
|
|
Shell commands which override the default method for
|
|
|
|
.Ar argument .
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Ar argument Ns Va _precmd
|
2002-11-21 20:12:05 +00:00
|
|
|
Shell commands to run just before running
|
2004-07-09 10:08:03 +00:00
|
|
|
.Ar argument Ns Va _cmd
|
2002-11-21 20:12:05 +00:00
|
|
|
or the default method for
|
|
|
|
.Ar argument .
|
|
|
|
If this returns a non-zero exit code, the main method is not performed.
|
|
|
|
If the default method is being executed, this check is performed after
|
|
|
|
the
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va required_*
|
2002-11-21 20:12:05 +00:00
|
|
|
checks and process (non-)existence checks.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Ar argument Ns Va _postcmd
|
2002-11-21 20:12:05 +00:00
|
|
|
Shell commands to run if running
|
2004-07-09 10:08:03 +00:00
|
|
|
.Ar argument Ns Va _cmd
|
2002-11-21 20:12:05 +00:00
|
|
|
or the default method for
|
2002-12-27 12:15:40 +00:00
|
|
|
.Ar argument
|
2002-11-21 20:12:05 +00:00
|
|
|
returned a zero exit code.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va sig_stop
|
2002-11-21 20:12:05 +00:00
|
|
|
Signal to send the processes to stop in the default
|
2004-07-09 10:08:03 +00:00
|
|
|
.Cm stop
|
2002-11-21 20:12:05 +00:00
|
|
|
method.
|
|
|
|
Defaults to
|
|
|
|
.Dv SIGTERM .
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va sig_reload
|
2002-11-21 20:12:05 +00:00
|
|
|
Signal to send the processes to reload in the default
|
2004-07-09 10:08:03 +00:00
|
|
|
.Cm reload
|
2002-11-21 20:12:05 +00:00
|
|
|
method.
|
|
|
|
Defaults to
|
|
|
|
.Dv SIGHUP .
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
For a given method
|
|
|
|
.Ar argument ,
|
|
|
|
if
|
2004-07-09 10:08:03 +00:00
|
|
|
.Ar argument Ns Va _cmd
|
2002-11-21 20:12:05 +00:00
|
|
|
is not defined, then a default method is provided by
|
2004-07-09 10:08:03 +00:00
|
|
|
.Ic run_rc_command :
|
|
|
|
.Bl -tag -width ".Sy Argument" -offset indent
|
2002-11-21 20:12:05 +00:00
|
|
|
.It Sy Argument
|
|
|
|
.Sy Default method
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Cm start
|
2002-11-21 20:12:05 +00:00
|
|
|
If
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va command
|
2002-11-21 20:12:05 +00:00
|
|
|
is not running and
|
2004-07-09 10:08:03 +00:00
|
|
|
.Ic checkyesno Va rcvar
|
2002-11-21 20:12:05 +00:00
|
|
|
succeeds, start
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va command .
|
|
|
|
.It Cm stop
|
2002-11-21 20:12:05 +00:00
|
|
|
Determine the PIDs of
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va command
|
2002-11-21 20:12:05 +00:00
|
|
|
with
|
|
|
|
.Ic check_pidfile
|
|
|
|
or
|
|
|
|
.Ic check_process
|
|
|
|
(as appropriate),
|
2004-07-09 10:08:03 +00:00
|
|
|
.Ic kill Va sig_stop
|
2002-11-21 20:12:05 +00:00
|
|
|
those PIDs, and run
|
|
|
|
.Ic wait_for_pids
|
|
|
|
on those PIDs.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Cm reload
|
2002-11-21 20:12:05 +00:00
|
|
|
Similar to
|
2004-07-09 10:08:03 +00:00
|
|
|
.Cm stop ,
|
2002-11-21 20:12:05 +00:00
|
|
|
except that it uses
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va sig_reload
|
|
|
|
instead, and does not run
|
2002-11-21 20:12:05 +00:00
|
|
|
.Ic wait_for_pids .
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Cm restart
|
2002-11-21 20:12:05 +00:00
|
|
|
Runs the
|
2004-07-09 10:08:03 +00:00
|
|
|
.Cm stop
|
2002-11-21 20:12:05 +00:00
|
|
|
method, then the
|
2004-07-09 10:08:03 +00:00
|
|
|
.Cm start
|
2002-11-21 20:12:05 +00:00
|
|
|
method.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Cm status
|
2002-11-21 20:12:05 +00:00
|
|
|
Show the PID of
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va command ,
|
2002-11-21 20:12:05 +00:00
|
|
|
or some other script specific status operation.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Cm poll
|
2002-11-21 20:12:05 +00:00
|
|
|
Wait for
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va command
|
2002-11-21 20:12:05 +00:00
|
|
|
to exit.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Cm rcvar
|
2002-11-21 20:12:05 +00:00
|
|
|
Display which
|
|
|
|
.Xr rc.conf 5
|
|
|
|
variable is used (if any).
|
|
|
|
This method always works, even if the appropriate
|
|
|
|
.Xr rc.conf 5
|
|
|
|
variable is set to
|
2004-07-09 10:08:03 +00:00
|
|
|
.Dq Li NO .
|
2002-11-21 20:12:05 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The following variables are available to the methods
|
|
|
|
(such as
|
2004-07-09 10:08:03 +00:00
|
|
|
.Ar argument Ns Va _cmd )
|
2002-11-21 20:12:05 +00:00
|
|
|
as well as after
|
|
|
|
.Ic run_rc_command
|
|
|
|
has completed:
|
2004-07-09 10:08:03 +00:00
|
|
|
.Bl -tag -width ".Va rc_flags" -offset indent
|
|
|
|
.It Va rc_arg
|
2002-11-21 20:12:05 +00:00
|
|
|
Argument provided to
|
2004-07-09 10:08:03 +00:00
|
|
|
.Ic run_rc_command ,
|
2002-11-21 20:12:05 +00:00
|
|
|
after fast and force processing has been performed.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va rc_flags
|
2002-12-27 12:15:40 +00:00
|
|
|
Flags to start the default command with.
|
2002-11-21 20:12:05 +00:00
|
|
|
Defaults to
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va ${name}_flags ,
|
2002-11-21 20:12:05 +00:00
|
|
|
unless overridden by the environment variable
|
|
|
|
.Sq Ev flags .
|
|
|
|
This variable may be changed by the
|
2004-07-09 10:08:03 +00:00
|
|
|
.Ar argument Ns Va _precmd
|
2002-11-21 20:12:05 +00:00
|
|
|
method.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va rc_pid
|
2002-11-21 20:12:05 +00:00
|
|
|
PID of
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va command
|
2002-11-21 20:12:05 +00:00
|
|
|
(if appropriate).
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va rc_fast
|
2002-11-21 20:12:05 +00:00
|
|
|
Not empty if
|
2004-07-09 10:08:03 +00:00
|
|
|
.Dq Li fast
|
2002-11-21 20:12:05 +00:00
|
|
|
prefix was used.
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Va rc_force
|
2002-11-21 20:12:05 +00:00
|
|
|
Not empty if
|
2004-07-09 10:08:03 +00:00
|
|
|
.Dq Li force
|
2002-11-21 20:12:05 +00:00
|
|
|
prefix was used.
|
|
|
|
.El
|
2004-07-09 10:08:03 +00:00
|
|
|
.It Ic run_rc_script Ar file argument
|
2002-11-21 20:12:05 +00:00
|
|
|
Start the script
|
|
|
|
.Ar file
|
|
|
|
with an argument of
|
|
|
|
.Ar argument ,
|
|
|
|
and handle the return value from the script.
|
|
|
|
.Pp
|
|
|
|
Various shell variables are unset before
|
|
|
|
.Ar file
|
|
|
|
is started:
|
|
|
|
.Bd -ragged -offset indent
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va name ,
|
|
|
|
.Va command ,
|
|
|
|
.Va command_args ,
|
|
|
|
.Va command_interpreter ,
|
|
|
|
.Va extra_commands ,
|
|
|
|
.Va pidfile ,
|
|
|
|
.Va rcvar ,
|
|
|
|
.Va required_dirs ,
|
|
|
|
.Va required_files ,
|
|
|
|
.Va required_vars ,
|
|
|
|
.Ar argument Ns Va _cmd ,
|
|
|
|
.Ar argument Ns Va _precmd .
|
|
|
|
.Ar argument Ns Va _postcmd .
|
2002-11-21 20:12:05 +00:00
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
The startup behaviour of
|
|
|
|
.Ar file
|
|
|
|
depends upon the following checks:
|
|
|
|
.Bl -enum
|
|
|
|
.It
|
|
|
|
If
|
|
|
|
.Ar file
|
|
|
|
ends in
|
|
|
|
.Pa .sh ,
|
|
|
|
it is sourced into the current shell.
|
|
|
|
.It
|
|
|
|
If
|
|
|
|
.Ar file
|
|
|
|
appears to be a backup or scratch file
|
|
|
|
(e.g., with a suffix of
|
2004-07-09 10:08:03 +00:00
|
|
|
.Pa ~ , # , .OLD ,
|
2002-11-21 20:12:05 +00:00
|
|
|
or
|
2004-07-09 10:08:03 +00:00
|
|
|
.Pa .orig ) ,
|
2002-11-21 20:12:05 +00:00
|
|
|
ignore it.
|
|
|
|
.It
|
|
|
|
If
|
|
|
|
.Ar file
|
|
|
|
is not executable, ignore it.
|
|
|
|
.It
|
|
|
|
If the
|
|
|
|
.Xr rc.conf 5
|
|
|
|
variable
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va rc_fast_and_loose
|
2002-11-21 20:12:05 +00:00
|
|
|
is empty,
|
|
|
|
source
|
|
|
|
.Ar file
|
|
|
|
in a sub shell,
|
|
|
|
otherwise source
|
|
|
|
.Ar file
|
|
|
|
into the current shell.
|
|
|
|
.El
|
|
|
|
.It Ic set_rcvar Op Ar base
|
2004-07-03 18:29:24 +00:00
|
|
|
Set the variable name required to start a service.
|
|
|
|
In
|
2002-11-21 20:12:05 +00:00
|
|
|
.Fx
|
|
|
|
a daemon is usually controlled by an
|
|
|
|
.Xr rc.conf 5
|
|
|
|
variable consisting of a daemon's name postfixed by the string
|
2004-07-09 10:08:03 +00:00
|
|
|
.Dq Li "_enable" .
|
2002-11-21 20:12:05 +00:00
|
|
|
This is not the case in
|
|
|
|
.Nx .
|
|
|
|
When the following line is included in a script
|
|
|
|
.Pp
|
2004-07-09 10:08:03 +00:00
|
|
|
.Dl "rcvar=`set_rcvar`"
|
2002-11-21 20:12:05 +00:00
|
|
|
.Pp
|
|
|
|
This function will use the value of the
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va $name
|
2002-11-21 20:12:05 +00:00
|
|
|
variable, which should be defined by the calling script, to construct the appropriate
|
|
|
|
.Xr rc.conf 5
|
2004-07-03 18:29:24 +00:00
|
|
|
knob.
|
|
|
|
If the
|
2002-11-21 20:12:05 +00:00
|
|
|
.Ar base
|
|
|
|
argument is set it will use
|
|
|
|
.Ar base
|
|
|
|
instead of
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va $name .
|
|
|
|
.It Ic wait_for_pids Op Ar pid ...
|
2002-11-21 20:12:05 +00:00
|
|
|
Wait until all of the provided
|
|
|
|
.Ar pids
|
2004-07-09 10:08:03 +00:00
|
|
|
do not exist any more, printing the list of outstanding
|
2002-11-21 20:12:05 +00:00
|
|
|
.Ar pids
|
|
|
|
every two seconds.
|
|
|
|
.It Ic warn Ar message
|
|
|
|
Display a warning message to
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va stderr
|
2002-11-21 20:12:05 +00:00
|
|
|
and log it to the system log
|
|
|
|
using
|
|
|
|
.Xr logger 1 .
|
|
|
|
The warning message consists of the script name
|
|
|
|
(from
|
2004-07-09 10:08:03 +00:00
|
|
|
.Va $0 ) ,
|
2002-11-21 20:12:05 +00:00
|
|
|
followed by
|
2004-07-09 10:08:03 +00:00
|
|
|
.Dq Li ": WARNING: " ,
|
2002-11-21 20:12:05 +00:00
|
|
|
and then
|
|
|
|
.Ar message .
|
|
|
|
.El
|
|
|
|
.Sh FILES
|
2004-07-09 10:08:03 +00:00
|
|
|
.Bl -tag -width ".Pa /etc/rc.subr" -compact
|
2002-11-21 20:12:05 +00:00
|
|
|
.It Pa /etc/rc.subr
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
file resides in
|
|
|
|
.Pa /etc .
|
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr rc.conf 5 ,
|
|
|
|
.Xr rc 8
|
|
|
|
.Sh HISTORY
|
2004-07-09 10:08:03 +00:00
|
|
|
The
|
2002-11-21 20:12:05 +00:00
|
|
|
.Nm
|
2004-07-09 10:08:03 +00:00
|
|
|
script
|
2002-11-21 20:12:05 +00:00
|
|
|
appeared in
|
|
|
|
.Nx 1.3 .
|
|
|
|
The
|
|
|
|
.Xr rc.d 8
|
|
|
|
support functions appeared in
|
|
|
|
.Nx 1.5 .
|
2004-07-09 10:08:03 +00:00
|
|
|
The
|
2002-11-21 20:12:05 +00:00
|
|
|
.Nm
|
2004-07-09 10:08:03 +00:00
|
|
|
script
|
2002-11-21 20:12:05 +00:00
|
|
|
first appeared in
|
|
|
|
.Fx 5.0 .
|