📄 simpleinit.8
字号:
.\" Copyright 1992, 1993 Rickard E. Faith (faith@cs.unc.edu).\" May be distributed under the GNU General Public License.\" " for emacs's hilit19 mode :-).TH SIMPLEINIT 8 "25 February 2001" "Linux 0.99" "Linux Programmer's Manual".SH NAMEsimpleinit \- process control initialization.SH SYNOPSIS.B "init [ single ] [ script ]".SH DESCRIPTION.B initis invoked as the last step in the Linux boot sequence. If the.B singleoption is used, or if the file.I /etc/singlebootexists, then single user mode will be entered, by starting.IR /bin/sh .If the file.I /etc/securesingleexists, then the root password will be required to start single user mode.If the root password does not exist, or if.I /etc/passwddoes not exist, the checking of the password will be skipped.If the file.I /etc/TZexists, then the contents of that file will be read, and used to set the TZenvironment variable for each process started by.BR simpleinit .This "feature" is only available if it's configured at compile-time. It'snot normally needed.After single user mode is terminated, the.I /etc/rcfile is executed, and the information in.I /etc/inittabwill be used to start processes. Alternatively, the \fI/etc/inittab\fPfile may be configured to run a different boot script. See below fordetails..SH "THE INITTAB FILE"Because of the number of init programs which are appearing in the Linuxcommunity, the documentation for the.I /etc/inittabfile, which is usually found with the.BR inittab (5)man page, is presented here:The format is.RS.B bootprog=file.B fileprefix=string.B PATH=search path.B INIT_PATH=search path.B "ttyline:termcap-entry:getty-command".B finalprog=path.REAn example is as follows:.nf.RSbootprog =fileprefix = /sbin/init.d/PATH = /usr/sbin:/usr/bin:/sbin:/binINIT_PATH = /sbin/init.dtty1:linux:/sbin/getty 9600 tty1tty2:linux:/sbin/getty 9600 tty2tty3:linux:/sbin/getty 9600 tty3tty4:linux:/sbin/getty 9600 tty4# tty5:linux:/sbin/getty 9600 tty5# ttyS1:dumb:/sbin/getty 9600 ttyS1# ttyS2:dumb:/sbin/getty -m -t60 2400 ttyS2finalprog = /sbin/rc.xdm.RE.fiLines beginning with the.B #character are treated as comments. Please see documentation for the.B getty (8)command that you are using, since there are several of these in the Linuxcommunity at this time.The \fBbootprog\fP value is appended to the \fBfileprefix\fP value,and the result specifies the boot programme (script) to run. Ifunspecified, the default is \fI/etc/rc\fP. If the boot programme is adirectory, then all scripts in that directory tree are executed, inparallel. See the \fBneed\fP(8) programme for details on how toelegantly control order of execution and manage dependencies.The \fBPATH\fP value is assigned to the PATH environment variable ofchild processes (boot scripts).The \fBINIT_PATH\fP value is used by simpleinit(8) itself to find thelocation of scripts to run (if an absolute path is not given). Ifunset and the boot programme is a directory, that directory is used.Finally, if the script cannot be found in this path, the standard\fBPATH\fP is used. This separation allows boot scripts to invokeprogrammes of the same name without conflict and without needing tospecify absolute paths.The \fBfinalprog\fP value specifies the path of the programme to runafter all \fBgetty\fP(8) instances are spawned. At bootup, it ispassed a single argument: "start". At shutdown, it is called again,this time with the argument: "stop"..SH SIGNALS\fBsimpleinit\fP(8) responds to signals in a variety of ways:.TP.B SIGHUPThe \fI/etc/inittab\fP configuration file will be read again..TP.B SIGTSTPThis flips a toggle, which controls whether more processes will bespawned..TP.B SIGINT\fBsimpleinit\fP(8) will sync a few times, and try to start\fBreboot\fP(8). Failing this, it will execute the system\fBreboot\fP(2) call. Under Linux, it is possible to configure theCtrl-Alt-Del sequence to send a signal to the \fBinit\fP processinstead of rebooting the system (\fBsimpleinit\fP(8) does this bydefault)..TP.B SIGQUITThe \fBreboot\fP(8) programme is executed in place of the\fBsimpleinit\fP(8) programme. This allows \fBreboot\fP(8) to cleanlyremount (read-only) the root filesystem, even if the old inode for the\fBinit\fP process was unlinked..SH FILES.I /etc/inittab.br.I /etc/singleboot.br.I /etc/securesingle.br.I /etc/TZ.br.I /etc/passwd.br.I /etc/rc.SH "SEE ALSO".BR inittab (5),.BR ctrlaltdel (8).BR reboot (8),.BR termcap (5),.BR getty (8),.BR agetty (8),.BR shutdown (8),.BR initctl (8).SH BUGSThis program is called.B simpleinitto distinguish it from the System V compatible versions of init which arestarting to appear in the Linux community..B simpleinitshould be linked to, or made identical with,.I initfor correct functionality..SH AUTHORPeter Orbaek (poe@daimi.aau.dk).brVersion 1.20, with patches for singleuser mode by Werner Almesberger.brRichard Gooch <rgooch@atnf.csiro.au>.brDependency support
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -