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