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 September 18, 2018 | .Dd December 29, 2018 | ||||
crees: Today. | |||||
.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 108 Lines • ▼ Show 20 Lines | |||||
.Fn run_rc_script | .Fn run_rc_script | ||||
(from | (from | ||||
.Xr rc.subr 8 ) , | .Xr rc.subr 8 ) , | ||||
which sets | which sets | ||||
.Va $1 | .Va $1 | ||||
to | to | ||||
.Dq Li start , | .Dq Li start , | ||||
and sources the script in a subshell. | and sources the script in a subshell. | ||||
If the script has a | |||||
.Pa .sh | |||||
suffix then it is sourced directly into the current shell. | |||||
Stop processing when the script that is the value of the | Stop processing when the script that is the value of the | ||||
Done Inline ActionsDid you mean to remove this bit? crees: Did you mean to remove this bit? | |||||
Done Inline ActionsI didn't -- thank you for catching this! ngie: I didn't -- thank you for catching this! | |||||
.Va $early_late_divider | .Va $early_late_divider | ||||
has been run. | has been run. | ||||
.It | .It | ||||
Check again to see if the file | Check again to see if the file | ||||
.Va ${firstboot_sentinel} | .Va ${firstboot_sentinel} | ||||
exists (in case it is located on a newly mounted file system) | exists (in case it is located on a newly mounted file system) | ||||
and adjust the list of KEYWORDs to skip appropriately. | and adjust the list of KEYWORDs to skip appropriately. | ||||
.It | .It | ||||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
.Fn run_rc_script | .Fn run_rc_script | ||||
(from | (from | ||||
.Xr rc.subr 8 ) , | .Xr rc.subr 8 ) , | ||||
which sets | which sets | ||||
.Va $1 | .Va $1 | ||||
to | to | ||||
.Dq Li stop , | .Dq Li stop , | ||||
and sources the script in a subshell. | and sources the script in a subshell. | ||||
If the script has a | |||||
.Pa .sh | |||||
suffix then it is sourced directly into the current shell. | |||||
.El | .El | ||||
.Ss Contents of Nm rc.d/ | .Ss Contents of Nm rc.d/ | ||||
.Nm rc.d/ | .Nm rc.d/ | ||||
is located in | is located in | ||||
.Pa /etc/rc.d/ . | .Pa /etc/rc.d/ . | ||||
The following file naming conventions are currently used in | The following file naming conventions are currently used in | ||||
.Nm rc.d/ : | .Nm rc.d/ : | ||||
.Bl -tag -width ".Pa ALLUPPERCASE" -offset indent | .Bl -tag -width ".Pa ALLUPPERCASE" -offset indent | ||||
Show All 23 Lines | |||||
.Pa ( inetd | .Pa ( inetd | ||||
and | and | ||||
.Pa sshd ) , | .Pa sshd ) , | ||||
as well as services which might run commands as users | as well as services which might run commands as users | ||||
.Pa ( cron | .Pa ( cron | ||||
and | and | ||||
.Pa sendmail ) . | .Pa sendmail ) . | ||||
.El | .El | ||||
.It Pa foo.sh | |||||
Scripts that are to be sourced into the current shell rather than a subshell | |||||
have a | |||||
.Pa .sh | |||||
suffix. | |||||
Extreme care must be taken in using this, as the startup sequence will | |||||
terminate if the script does. | |||||
.It Pa bar | .It Pa bar | ||||
Scripts that are sourced in a subshell. | Scripts that are sourced in a subshell. | ||||
The boot does not stop if such a script terminates with a non-zero status, | The boot does not stop if such a script terminates with a non-zero status, | ||||
but a script can stop the boot if necessary by invoking the | but a script can stop the boot if necessary by invoking the | ||||
.Fn stop_boot | .Fn stop_boot | ||||
function (from | function (from | ||||
.Xr rc.subr 8 ) . | .Xr rc.subr 8 ) . | ||||
.El | .El | ||||
▲ Show 20 Lines • Show All 299 Lines • Show Last 20 Lines |
Today.