1INIT(8)                     System Manager's Manual                    INIT(8)
2
3
4

NAME

6       init, rc  -  process control initialization
7

SYNOPSIS

9       /etc/init
10       /etc/rc
11

DESCRIPTION

13       Init  is  invoked as the last step of the boot procedure (see boot(8)).
14       Generally its role is to create a process for each typewriter on  which
15       a user may log in.
16
17       When  init  first  is executed the console typewriter /dev/console.  is
18       opened for reading and writing and the shell  is  invoked  immediately.
19       This  feature  is  used to bring up a single-user system.  If the shell
20       terminates, init comes up multi-user and the process described below is
21       started.
22
23       When init comes up multiuser, it invokes a shell, with input taken from
24       the file /etc/rc.  This command file performs housekeeping like  remov‐
25       ing temporary files, mounting file systems, and starting daemons.
26
27       Then  init reads the file /etc/ttys and forks several times to create a
28       process for each typewriter specified in the file.  Each of these  pro‐
29       cesses opens the appropriate typewriter for reading and writing.  These
30       channels thus receive file descriptors 0, 1 and 2, the standard  input,
31       output  and error files.  Opening the typewriter will usually involve a
32       delay, since the open is not completed until someone is dialed  up  and
33       carrier  established  on  the  channel.  Then /etc/getty is called with
34       argument as specified by the last character  of  the  ttys  file  line.
35       Getty reads the user's name and invokes login(1) to log in the user and
36       execute the shell.
37
38       Ultimately the shell will terminate because of  an  end-of-file  either
39       typed explicitly or generated as a result of hanging up.  The main path
40       of init, which has been waiting for such an event, wakes up and removes
41       the  appropriate entry from the file utmp, which records current users,
42       and makes an entry in  /usr/adm/wtmp,  which  maintains  a  history  of
43       logins  and  logouts.   Then the appropriate typewriter is reopened and
44       getty is reinvoked.
45
46       Init catches the hangup signal SIGHUP and interprets it  to  mean  that
47       the system should be brought from multi user to single user.  Use `kill
48       -1 1' to send the hangup signal.
49

FILES

51       /dev/tty?, /etc/utmp, /usr/adm/wtmp, /etc/ttys, /etc/rc
52

SEE ALSO

54       login(1), kill(1), sh(1), ttys(5), getty(8)
55
56
57
58                                                                       INIT(8)
Impressum