Changeset View
Changeset View
Standalone View
Standalone View
sbin/init/init.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. | ||||
.\" | .\" | ||||
.\" @(#)init.8 8.3 (Berkeley) 4/18/94 | .\" @(#)init.8 8.3 (Berkeley) 4/18/94 | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd August 6, 2019 | .Dd July 22, 2021 | ||||
.Dt INIT 8 | .Dt INIT 8 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm init | .Nm init | ||||
.Nd process control initialization | .Nd process control initialization | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.Nm | .Nm | ||||
.Nm | .Nm | ||||
▲ Show 20 Lines • Show All 231 Lines • ▼ Show 20 Lines | |||||
passes | passes | ||||
.Dq Li single | .Dq Li single | ||||
as the argument to the shutdown script if return to single-user mode | as the argument to the shutdown script if return to single-user mode | ||||
is requested. | is requested. | ||||
Otherwise, | Otherwise, | ||||
.Dq Li reboot | .Dq Li reboot | ||||
argument is used. | argument is used. | ||||
.Pp | .Pp | ||||
After all user processes have been terminated, | |||||
.Nm | |||||
will try to run the | |||||
.Pa /etc/rc.final | |||||
script. | |||||
This script can be used to finally prepare and unmount filesystems that may have | |||||
been needed during shutdown, for instance. | |||||
.Pp | |||||
The role of | The role of | ||||
.Nm | .Nm | ||||
is so critical that if it dies, the system will reboot itself | is so critical that if it dies, the system will reboot itself | ||||
automatically. | automatically. | ||||
If, at bootstrap time, the | If, at bootstrap time, the | ||||
.Nm | .Nm | ||||
process cannot be located, the system will panic with the message | process cannot be located, the system will panic with the message | ||||
.Dq "panic: init died (signal %d, exit %d)" . | .Dq "panic: init died (signal %d, exit %d)" . | ||||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||
Defines the shell binary to be used for executing the various shell scripts. | Defines the shell binary to be used for executing the various shell scripts. | ||||
The default is | The default is | ||||
.Dq Li /bin/sh . | .Dq Li /bin/sh . | ||||
It is used for running the | It is used for running the | ||||
.Va init_exec | .Va init_exec | ||||
or | or | ||||
.Va init_script | .Va init_script | ||||
if set, as well as for the | if set, as well as for the | ||||
.Pa /etc/rc | .Pa /etc/rc , | ||||
.Pa /etc/rc.shutdown , | |||||
and | and | ||||
.Pa /etc/rc.shutdown | .Pa /etc/rc.final | ||||
scripts. | scripts. | ||||
The value of the corresponding | The value of the corresponding | ||||
.Xr kenv 2 | .Xr kenv 2 | ||||
variable is evaluated every time | variable is evaluated every time | ||||
.Nm | .Nm | ||||
calls a shell script, so it can be changed later on using the | calls a shell script, so it can be changed later on using the | ||||
.Xr kenv 1 | .Xr kenv 1 | ||||
utility. | utility. | ||||
Show All 13 Lines | |||||
terminal ports found in | terminal ports found in | ||||
.Xr ttys 5 | .Xr ttys 5 | ||||
.It Pa /etc/ttys | .It Pa /etc/ttys | ||||
the terminal initialization information file | the terminal initialization information file | ||||
.It Pa /etc/rc | .It Pa /etc/rc | ||||
system startup commands | system startup commands | ||||
.It Pa /etc/rc.shutdown | .It Pa /etc/rc.shutdown | ||||
system shutdown commands | system shutdown commands | ||||
.It Pa /etc/rc.final | |||||
system shutdown commands (after process termination) | |||||
.It Pa /var/log/init.log | .It Pa /var/log/init.log | ||||
log of | log of | ||||
.Xr rc 8 | .Xr rc 8 | ||||
output if the system console device is not available | output if the system console device is not available | ||||
.El | .El | ||||
.Sh DIAGNOSTICS | .Sh DIAGNOSTICS | ||||
.Bl -diag | .Bl -diag | ||||
.It "getty repeating too quickly on port %s, sleeping." | .It "getty repeating too quickly on port %s, sleeping." | ||||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |