]> git.ipfire.org Git - thirdparty/util-linux.git/blob - login-utils/simpleinit.8
Imported from util-linux-2.10s tarball.
[thirdparty/util-linux.git] / login-utils / simpleinit.8
1 .\" Copyright 1992, 1993 Rickard E. Faith (faith@cs.unc.edu)
2 .\" May be distributed under the GNU General Public License
3 .\" " for emacs's hilit19 mode :-)
4 .TH SIMPLEINIT 8 "4 November 2000" "Linux 0.99" "Linux Programmer's Manual"
5 .SH NAME
6 simpleinit \- process control initialization
7 .SH SYNOPSIS
8 .B "init [ single ] [ script ]"
9 .SH DESCRIPTION
10 .B init
11 is invoked as the last step in the Linux boot sequence. If the
12 .B single
13 option is used, or if the file
14 .I /etc/singleboot
15 exists, then single user mode will be entered, by starting
16 .IR /bin/sh .
17 If the file
18 .I /etc/securesingle
19 exists, then the root password will be required to start single user mode.
20 If the root password does not exist, or if
21 .I /etc/passwd
22 does not exist, the checking of the password will be skipped.
23
24 If the file
25 .I /etc/TZ
26 exists, then the contents of that file will be read, and used to set the TZ
27 environment variable for each process started by
28 .BR simpleinit .
29 This "feature" is only available if it's configured at compile-time. It's
30 not normally needed.
31
32 After single user mode is terminated, the
33 .I /etc/rc
34 file is executed, and the information in
35 .I /etc/inittab
36 will be used to start processes. Alternatively, the \fI/etc/inittab\fP
37 file may be configured to run a different boot script. See below for
38 details.
39
40 .SH "THE INITTAB FILE"
41 Because of the number of init programs which are appearing in the Linux
42 community, the documentation for the
43 .I /etc/inittab
44 file, which is usually found with the
45 .BR inittab (5)
46 man page, is presented here:
47
48 The format is
49
50 .RS
51 .B bootprog=file
52
53 .B fileprefix=string
54
55 .B PATH=search path
56
57 .B INIT_PATH=search path
58
59 .B "ttyline:termcap-entry:getty-command"
60
61 .B finalprog=path
62 .RE
63
64 An example is as follows:
65
66 .nf
67 .RS
68 bootprog =
69 fileprefix = /sbin/init.d/
70 PATH = /usr/sbin:/usr/bin:/sbin:/bin
71 INIT_PATH = /sbin/init.d
72
73 tty1:linux:/sbin/getty 9600 tty1
74 tty2:linux:/sbin/getty 9600 tty2
75 tty3:linux:/sbin/getty 9600 tty3
76 tty4:linux:/sbin/getty 9600 tty4
77 # tty5:linux:/sbin/getty 9600 tty5
78 # ttyS1:dumb:/sbin/getty 9600 ttyS1
79 # ttyS2:dumb:/sbin/getty -m -t60 2400 ttyS2
80
81 finalprog = /sbin/rc.xdm
82 .RE
83 .fi
84
85 Lines beginning with the
86 .B #
87 character are treated as comments. Please see documentation for the
88 .B getty (8)
89 command that you are using, since there are several of these in the Linux
90 community at this time.
91
92 The \fBbootprog\fP value is appended to the \fBfileprefix\fP value,
93 and the result specifies the boot programme (script) to run. If
94 unspecified, the default is \fI/etc/rc\fP. If the boot programme is a
95 directory, then all scripts in that directory tree are executed, in
96 parallel. See the \fBneed\fP(8) programme for details on how to
97 elegantly control order of execution and manage dependencies.
98
99 The \fBPATH\fP value is assigned to the PATH environment variable of
100 child processes (boot scripts). The \fBINIT_PATH\fP value is used by
101 simpleinit(8) itself to find the location of scripts to run (if an
102 absolute path is not given). If unset the default value \fBPATH\fP is
103 used. This separation allows boot scripts to invoke programmes of the
104 same name without conflict and without needing to specify absolute
105 paths.
106
107 The \fBfinalprog\fP value specifies the path of the programme to run
108 after all \fBgetty\fP(8) instances are spawned. At bootup, it is
109 passed a single argument: "start". At shutdown, it is called again,
110 this time with the argument: "stop".
111 .SH SIGNALS
112 \fBsimpleinit\fP(8) responds to signals in a variety of ways:
113 .TP
114 .B SIGHUP
115 The \fI/etc/inittab\fP configuration file will be read again.
116 .TP
117 .B SIGTSTP
118 This flips a toggle, which controls whether more processes will be
119 spawned.
120 .TP
121 .B SIGINT
122 \fBsimpleinit\fP(8) will sync a few times, and try to start
123 \fBreboot\fP(8). Failing this, it will execute the system
124 \fBreboot\fP(2) call. Under Linux, it is possible to configure the
125 Ctrl-Alt-Del sequence to send a signal to the \fBinit\fP process
126 instead of rebooting the system (\fBsimpleinit\fP(8) does this by
127 default).
128 .TP
129 .B SIGQUIT
130 The \fBreboot\fP(8) programme is executed in place of the
131 \fBsimpleinit\fP(8) programme. This allows \fBreboot\fP(8) to cleanly
132 remount (read-only) the root filesystem, even if the old inode for the
133 \fBinit\fP process was unlinked.
134 .SH FILES
135 .I /etc/inittab
136 .br
137 .I /etc/singleboot
138 .br
139 .I /etc/securesingle
140 .br
141 .I /etc/TZ
142 .br
143 .I /etc/passwd
144 .br
145 .I /etc/rc
146 .SH "SEE ALSO"
147 .BR inittab (5),
148 .BR ctrlaltdel (8)
149 .BR reboot (8),
150 .BR termcap (5),
151 .BR getty (8),
152 .BR agetty (8),
153 .BR shutdown (8),
154 .BR need (8)
155 .SH BUGS
156 This program is called
157 .B simpleinit
158 to distinguish it from the System V compatible versions of init which are
159 starting to appear in the Linux community.
160 .B simpleinit
161 should be linked to, or made identical with,
162 .I init
163 for correct functionality.
164 .SH AUTHOR
165 Peter Orbaek (poe@daimi.aau.dk)
166 .br
167 Version 1.20, with patches for singleuser mode by Werner Almesberger
168 .br
169 Richard Gooch <rgooch@atnf.csiro.au>
170 .br
171 Dependency support