Correct .Nm use. Add rcsid. Use min for minutes instead of mn.
This commit is contained in:
parent
e333b9445f
commit
5df42cf4ae
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=37417
@ -33,7 +33,7 @@
|
|||||||
.\" SUCH DAMAGE.
|
.\" SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.\" @(#)init.8 8.3 (Berkeley) 4/18/94
|
.\" @(#)init.8 8.3 (Berkeley) 4/18/94
|
||||||
.\" $Id: init.8,v 1.10 1997/08/02 00:22:48 davidn Exp $
|
.\" $Id: init.8,v 1.11 1998/06/19 08:34:52 jkoshy Exp $
|
||||||
.\"
|
.\"
|
||||||
.Dd April 18, 1994
|
.Dd April 18, 1994
|
||||||
.Dt INIT 8
|
.Dt INIT 8
|
||||||
@ -45,18 +45,18 @@
|
|||||||
.Nm init
|
.Nm init
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The
|
The
|
||||||
.Nm init
|
.Nm
|
||||||
program
|
program
|
||||||
is the last stage of the boot process.
|
is the last stage of the boot process.
|
||||||
It normally runs the automatic reboot sequence as described in
|
It normally runs the automatic reboot sequence as described in
|
||||||
.Xr reboot 8 ,
|
.Xr reboot 8 ,
|
||||||
and if this succeeds, begins multi-user operation.
|
and if this succeeds, begins multi-user operation.
|
||||||
If the reboot scripts fail,
|
If the reboot scripts fail,
|
||||||
.Nm init
|
.Nm
|
||||||
commences single user operation by giving
|
commences single user operation by giving
|
||||||
the super-user a shell on the console.
|
the super-user a shell on the console.
|
||||||
The
|
The
|
||||||
.Nm init
|
.Nm
|
||||||
program may be passed parameters
|
program may be passed parameters
|
||||||
from the boot program to
|
from the boot program to
|
||||||
prevent the system from going multi-user and to instead execute
|
prevent the system from going multi-user and to instead execute
|
||||||
@ -66,27 +66,27 @@ later be made to go to multi-user by exiting the
|
|||||||
single-user shell (with ^D).
|
single-user shell (with ^D).
|
||||||
This
|
This
|
||||||
causes
|
causes
|
||||||
.Nm init
|
.Nm
|
||||||
to run the
|
to run the
|
||||||
.Pa /etc/rc
|
.Pa /etc/rc
|
||||||
start up command file in fastboot mode (skipping disk checks).
|
start up command file in fastboot mode (skipping disk checks).
|
||||||
.Pp
|
.Pp
|
||||||
If the
|
If the
|
||||||
.Nm console
|
.Em console
|
||||||
entry in the
|
entry in the
|
||||||
.Xr ttys 5
|
.Xr ttys 5
|
||||||
file is marked ``insecure'',
|
file is marked ``insecure'',
|
||||||
then
|
then
|
||||||
.Nm init
|
.Nm
|
||||||
will require that the superuser password be
|
will require that the superuser password be
|
||||||
entered before the system will start a single-user shell.
|
entered before the system will start a single-user shell.
|
||||||
The password check is skipped if the
|
The password check is skipped if the
|
||||||
.Nm console
|
.Em console
|
||||||
is marked as ``secure''.
|
is marked as ``secure''.
|
||||||
.Pp
|
.Pp
|
||||||
The kernel runs with four different levels of security.
|
The kernel runs with four different levels of security.
|
||||||
Any superuser process can raise the security level, but only
|
Any superuser process can raise the security level, but only
|
||||||
.Nm init
|
.Nm
|
||||||
can lower it.
|
can lower it.
|
||||||
The security levels are:
|
The security levels are:
|
||||||
.Bl -tag -width flag
|
.Bl -tag -width flag
|
||||||
@ -116,10 +116,10 @@ while the system is multi-user.
|
|||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
If the security level is initially -1, then
|
If the security level is initially -1, then
|
||||||
.Nm init
|
.Nm
|
||||||
leaves it unchanged.
|
leaves it unchanged.
|
||||||
Otherwise,
|
Otherwise,
|
||||||
.Nm init
|
.Nm
|
||||||
arranges to run the system in level 0 mode while single user
|
arranges to run the system in level 0 mode while single user
|
||||||
and in level 1 mode while multiuser.
|
and in level 1 mode while multiuser.
|
||||||
If level 2 mode is desired while running multiuser,
|
If level 2 mode is desired while running multiuser,
|
||||||
@ -132,7 +132,7 @@ to set the
|
|||||||
variable to the required security level.
|
variable to the required security level.
|
||||||
.Pp
|
.Pp
|
||||||
In multi-user operation,
|
In multi-user operation,
|
||||||
.Nm init
|
.Nm
|
||||||
maintains
|
maintains
|
||||||
processes for the terminal ports found in the file
|
processes for the terminal ports found in the file
|
||||||
.Xr ttys 5 .
|
.Xr ttys 5 .
|
||||||
@ -153,7 +153,7 @@ executes a shell for that user. When this shell
|
|||||||
dies, either because the user logged out
|
dies, either because the user logged out
|
||||||
or an abnormal termination occurred (a signal),
|
or an abnormal termination occurred (a signal),
|
||||||
the
|
the
|
||||||
.Nm init
|
.Nm
|
||||||
program wakes up, deletes the user
|
program wakes up, deletes the user
|
||||||
from the
|
from the
|
||||||
.Xr utmp 5
|
.Xr utmp 5
|
||||||
@ -162,7 +162,7 @@ file of current users and records the logout in the
|
|||||||
file.
|
file.
|
||||||
The cycle is
|
The cycle is
|
||||||
then restarted by
|
then restarted by
|
||||||
.Nm init
|
.Nm
|
||||||
executing a new
|
executing a new
|
||||||
.Nm getty
|
.Nm getty
|
||||||
for the line.
|
for the line.
|
||||||
@ -173,34 +173,34 @@ may be changed in the
|
|||||||
file without a reboot by sending the signal
|
file without a reboot by sending the signal
|
||||||
.Dv SIGHUP
|
.Dv SIGHUP
|
||||||
to
|
to
|
||||||
.Nm init
|
.Nm
|
||||||
with the command
|
with the command
|
||||||
.Dq Li "kill -HUP 1" .
|
.Dq Li "kill -HUP 1" .
|
||||||
On receipt of this signal,
|
On receipt of this signal,
|
||||||
.Nm init
|
.Nm
|
||||||
re-reads the
|
re-reads the
|
||||||
.Xr ttys 5
|
.Xr ttys 5
|
||||||
file.
|
file.
|
||||||
When a line is turned off in
|
When a line is turned off in
|
||||||
.Xr ttys 5 ,
|
.Xr ttys 5 ,
|
||||||
.Nm init
|
.Nm
|
||||||
will send a SIGHUP signal to the controlling process
|
will send a SIGHUP signal to the controlling process
|
||||||
for the session associated with the line.
|
for the session associated with the line.
|
||||||
For any lines that were previously turned off in the
|
For any lines that were previously turned off in the
|
||||||
.Xr ttys 5
|
.Xr ttys 5
|
||||||
file and are now on,
|
file and are now on,
|
||||||
.Nm init
|
.Nm
|
||||||
executes a new
|
executes a new
|
||||||
.Nm getty
|
.Nm getty
|
||||||
to enable a new login.
|
to enable a new login.
|
||||||
If the getty or window field for a line is changed,
|
If the getty or window field for a line is changed,
|
||||||
the change takes effect at the end of the current
|
the change takes effect at the end of the current
|
||||||
login session (e.g., the next time
|
login session (e.g., the next time
|
||||||
.Nm init
|
.Nm
|
||||||
starts a process on the line).
|
starts a process on the line).
|
||||||
If a line is commented out or deleted from
|
If a line is commented out or deleted from
|
||||||
.Xr ttys 5 ,
|
.Xr ttys 5 ,
|
||||||
.Nm init
|
.Nm
|
||||||
will not do anything at all to that line.
|
will not do anything at all to that line.
|
||||||
However, it will complain that the relationship between lines
|
However, it will complain that the relationship between lines
|
||||||
in the
|
in the
|
||||||
@ -218,7 +218,7 @@ signal, for example,
|
|||||||
.Dq Li "kill \-TERM 1" .
|
.Dq Li "kill \-TERM 1" .
|
||||||
If there are processes outstanding that are deadlocked (because of
|
If there are processes outstanding that are deadlocked (because of
|
||||||
hardware or software failure),
|
hardware or software failure),
|
||||||
.Nm init
|
.Nm
|
||||||
will not wait for them all to die (which might take forever), but
|
will not wait for them all to die (which might take forever), but
|
||||||
will time out after 30 seconds and print a warning message.
|
will time out after 30 seconds and print a warning message.
|
||||||
.Pp
|
.Pp
|
||||||
@ -246,7 +246,7 @@ This is useful for shutting the machine down cleanly from inside the kernel
|
|||||||
or from X when the machine appears to be hung.
|
or from X when the machine appears to be hung.
|
||||||
.Pp
|
.Pp
|
||||||
When shutting down the machine,
|
When shutting down the machine,
|
||||||
.Nm init
|
.Nm
|
||||||
will try to run the
|
will try to run the
|
||||||
.Pa /etc/rc.shutdown
|
.Pa /etc/rc.shutdown
|
||||||
script. This script can be used to cleanly terminate specific programs such
|
script. This script can be used to cleanly terminate specific programs such
|
||||||
@ -255,11 +255,11 @@ as
|
|||||||
(the InterNetNews server).
|
(the InterNetNews server).
|
||||||
.Pp
|
.Pp
|
||||||
The role of
|
The role of
|
||||||
.Nm init
|
.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 init
|
.Nm
|
||||||
process cannot be located, the system will panic with the message
|
process cannot be located, the system will panic with the message
|
||||||
``panic: "init died (signal %d, exit %d)''.
|
``panic: "init died (signal %d, exit %d)''.
|
||||||
.Sh DIAGNOSTICS
|
.Sh DIAGNOSTICS
|
||||||
@ -281,20 +281,20 @@ a persistent device error condition.
|
|||||||
.Sh FILES
|
.Sh FILES
|
||||||
.Bl -tag -width /var/log/wtmp -compact
|
.Bl -tag -width /var/log/wtmp -compact
|
||||||
.It Pa /dev/console
|
.It Pa /dev/console
|
||||||
System console device.
|
system console device
|
||||||
.It Pa /dev/tty*
|
.It Pa /dev/tty*
|
||||||
Terminal ports found in
|
terminal ports found in
|
||||||
.Xr ttys 5 .
|
.Xr ttys 5
|
||||||
.It Pa /var/run/utmp
|
.It Pa /var/run/utmp
|
||||||
Record of Current users on the system.
|
record of current users on the system
|
||||||
.It Pa /var/log/wtmp
|
.It Pa /var/log/wtmp
|
||||||
Record of all logins and logouts.
|
record of all logins and logouts
|
||||||
.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
|
||||||
.El
|
.El
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr kill 1 ,
|
.Xr kill 1 ,
|
||||||
|
@ -32,18 +32,20 @@
|
|||||||
* 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.
|
||||||
*
|
|
||||||
* $Id: init.c,v 1.28 1997/10/10 12:14:48 peter Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static const char copyright[] =
|
||||||
"@(#) Copyright (c) 1991, 1993\n\
|
"@(#) Copyright (c) 1991, 1993\n\
|
||||||
The Regents of the University of California. All rights reserved.\n";
|
The Regents of the University of California. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
|
#if 0
|
||||||
static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 7/15/93";
|
static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 7/15/93";
|
||||||
|
#endif
|
||||||
|
static const char rcsid[] =
|
||||||
|
"$Id$";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -94,7 +96,7 @@ static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 7/15/93";
|
|||||||
#define WINDOW_WAIT 3 /* wait N secs after starting window */
|
#define WINDOW_WAIT 3 /* wait N secs after starting window */
|
||||||
#define STALL_TIMEOUT 30 /* wait N secs after warning */
|
#define STALL_TIMEOUT 30 /* wait N secs after warning */
|
||||||
#define DEATH_WATCH 10 /* wait N secs for procs to die */
|
#define DEATH_WATCH 10 /* wait N secs for procs to die */
|
||||||
#define DEATH_SCRIPT 120 /* wait for 2mn for /etc/rc.shutdown */
|
#define DEATH_SCRIPT 120 /* wait for 2min for /etc/rc.shutdown */
|
||||||
#define RESOURCE_RC "daemon"
|
#define RESOURCE_RC "daemon"
|
||||||
#define RESOURCE_WINDOW "default"
|
#define RESOURCE_WINDOW "default"
|
||||||
#define RESOURCE_GETTY "default"
|
#define RESOURCE_GETTY "default"
|
||||||
|
Loading…
Reference in New Issue
Block a user