Sun Microsystems Sun Workstation 100U System Manager's Manual page 198

Table of Contents

Advertisement

INIT( 8)
MAINTENANCE COMMANDS
INIT( 8)
NAME
init - process control initialization
SYNOPSIS
/ete/lnlt
DESCRIPTION
Ini' is invoked inside UNIX as the last step in the boot procedure. It normally then runs the
automatic reboot sequence as described in reboot(8), and if this succeeds, begins multi-user oper:r
tion. If the reboot fails, it commences single user operation by giving the super-user a shell on the
console. It is possible to pass parameters from the boot program to ini' so that single user oper:r
tion is commenced immediately. When such single user operation is terminated by killing the
single-user shell (i.e. by hitting
AD),
ini' runs letclrc without the reboot parameter. This com-
mand file performs housekeeping operations such as removing temporary files, mounting file sys.-
tems, and starting daemons.
In multi-user operation, init'a role is to create a process for each terminal port on which a user
may log in. To begin such operations, it reads the file
I
etcl ttya and forks several times to create
a process for each terminal specified in the file. Each of these processes opens the appropriate ter-
minal for reading and writing. These channels thus receive file descriptors 0, 1 and 2, the stan-
dard input and output and the diagnostic output. Opening the terminal will usually involve a
delay, since the open is not completed until someone is dialed up and carrier established on the
channel. If a terminal exists but an error occurs when trying to open the terminal init complains
by writing a message to the system console; the message is repeated every 10 minutes for each
such terminal until the terminal is shut off in letc/ttys and init notified (by a hangup, as
described below), or the terminal becomes accessible (init checks again every minute). After an
open succeeds,
I
etcl getty
is
called with argument as specified by the second character of the ttya
file line. Gettl/ reads the user's name and invokes login to log in the user and execute the Shell.
Ultimately the Shell will terminate because of an end-of-file either typed explicitly or generated as
a result of hanging up. The main path of init, which has been waiting for such an event, wakes
up and removes the appropriate entry from the file utmp, which records current users, and makes
an entry in
I
uarl (Jdml wtmp, which maintains a history of logins and logouts. The wtmp entry is
made only if a user logged in successfully on the line. Then the appropriate terminal
is
reopened
and gettl/ is reinvoked.
Init catches the h(Jngup signal (signal SIGHUP) and interprets it to mean that the file
I
etcl ttya
should be read again. The Shell process on each line which used to
be
active in ttl/S but is no
longer there is terminated; a new process is created for each added line; lines unchanged in the file
are undisturbed. Thus it is possible to drop or add phone lines without rebooting the system by
changing the ttl/a file and sending a h(Jngup signal to the init process: use 'kill -HUP
1.'
Init will terminate multi-user operations and resume single-user mode if sent a terminate (TERM)
signal, i.e. "kill -TERM 1". If there are processes outstanding which are deadlocked (due to
hardware or software failure), init will not wait for them all to die (which might take forever), but
will time out after 30 seconds and print a warning message.
Init will cease creating new getty's and allow the system to slowly die away,
if it is sent a terminal
stop (TSTP) signal, i.e. "kill -TSTP 1". A later hangup will resume full multi-user operations, or
a terminate will initiate a single user shell. This hook is used by rehoot(8) and h(Jlt(8).
Ini". role is so critical that if it dies, the system will reboot itself automatically.
If,
at bootstrap
time, the init process cannot
be
located, the system will loop in user mode at location Ox13.
DIAGNOSTICS
lnltl ttl/I cannot open. A terminal which is turned on in the rc file cannot be opened, likely
because the requisite lines are either not configured into the system or the associated device was
not attached during boot.-time system configuration.
Sun Release 1.1
Last change: 30 October 1983
43

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sun workstation 150u

Table of Contents