.\" Copyright (c) 1993 Christoph M. Robitschko
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by Christoph M. Robitschko
.\" 4. The name of the author may not be used to endorse or promote products
.\" derived from this software withough specific prior written permission
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.Nd ancestor of all user-level processes
is started by the Operating System kernel as the first user-level process
It creates more processes to execute the system startup script
and enable users to login. If the system startup fails for any reason,
it gives the system administrator a shell on the console.
Note that you cannot execute the
program directly (except if you are a UNIX kernel, which seems unlikely).
.Bl -tag -width Ds -offset indent
Starts a singleuser shell instead of booting the system to multiuser mode
argument, which causes it to skip disk checks
Sets the debug level to the specified number.
to read its configuration from file
instead of the default /etc/init.conf .
Only checks the configuration file for syntax errors and exits immediately
.Em Singleuser and multiuser modes
.Bd -filled -offset indent
\&. The normal state is multiuser, where system daemons such as
are active and the system accepts logins from direct connect ttys (with
) and from the network. In singleuser mode, all daemons and user processes
starts a shell on the system console. This shell can be used by the
system manager for administrative purposes. Because no proceses are running
that have files open, all file systems except the root file system can be
.Em System startup and shutdown
.Bd -filled -offset indent
When the system is booted, it creates process 1 and executes the file
in it. The arguments that are given to the kernel are passed on to
starts a shell to execute the
flag is specified, in which case the script is called without arguments).
This script checks and mounts file systems and starts
system daemons. If the script fails (exits with a status unequal to zero),
a shell is started on the console to enable the system administrator to
cure the problem. When this shell terminates,
again (without arguments). When finally this script terminates with
an exit status of zero (signaling success),
starts multiuser mode by reading the file
and starting getty processes for the terminals that are marked active
To bring the system from multiuser to singleuser mode, you can use
.Bd -filled -offset indent
The following list of signals is only here for completeness; You should
directly, but instead use the
command to perform a state change.
go to singleuser mode immediately. All processes are terminated, and then
a singleuser shell is started on the console.
Drain the system. No new processes are created. The only way out of
this pseudo-state is another SIGHUP or SIGTERM signal.
Re-read the configuration file. Only valid when in Singleuser mode.
Increase debugging level (if debugging is compiled in)
.Bd -filled -offset indent
or the file specified with the
Each line in this file specifies a thing to configure.
Empty lines and lines with a hash character
as the first character are ignored.
.Bd -filled -offset indent
set a soft or hard limit, respectively. LIMIT can be one of
The VALUE is specified in bytes or seconds. See
Note that you cannot raise hard limits.
Note also that the specified limits are not used for
itself, but for all processes it creates.
.Bd -filled -offset indent
Sets the specified environment-variable VAR with the specified VALUE.
VALUE can be ommitted. This setting is valid for all processes
.Bd -filled -offset indent
Sets the debug level of init to the specified value. Note that a level
option takes precedence over this.
startup_state { singleuser | multiuser }
.Bd -filled -offset indent
Sets the default runlevel to singleuser or multiuser mode, respectively.
is specified, it always goes to singleuser mode.
.Bd -filled -offset indent
Reads further configuration instructions from file "FILE" and continues in the
current file afterwards. Include commands can be nested up to a level of 50.
singleusershell "COMMAND"
.Bd -filled -offset indent
Lets you specify a command to execute as a singleuser shell. Note that the
first argument you specify is the 0th argument passed to the program.
singleuserterminal "TYPE"
.Bd -filled -offset indent
Lets you specify a terminal type that is passed in the TERM environment
variable to the singleusershell. Default is "pc3".
singleuserdevice "DEVICE"
.Bd -filled -offset indent
Lets you specify a terminal device where the singleusershell will be started.
Default is "/dev/console".
autobootcommand "COMMAND"
fastbootcommand "COMMAND"
.Bd -filled -offset indent
Lets you specify a command that is executed when the system goes to multiuser
mode. The difference between the two is that autobootcommand is only executed
when the system starts multiuser mode immediately after boot, and only if
If the system has already been in singleuser mode or
was used, fastbootcommand is used instead. The defaults are
"/bin/sh sh /etc/rc autoboot" for autobootcommand, and "/bin/sh sh /etc/rc"
timeout shutdown sigterm TIME
timeout shutdown sigkill TIME
.Bd -filled -offset indent
Normally, if you shutdown to singleuser mode,
sends a SIGTERM signal to all processes to give them a chance to
terminate gracefully, waits 10 seconds, then sends a SIGKILL to all
remaining processes and waits up to 30 seconds. You can change these timeouts
.Bd -filled -offset indent
encouters a serious problem (such as "fork failed" or "out of memory"), it
does not terminate, but instead continues its work and retries the operation
at a later time. The default is to retry after 300 seconds.
respawn checkstatus { yes | no }
.Bd -filled -offset indent
should check the termination status of its children, in order to see if these
children fail (e.g. a getty on a non-existent device). The default is yes,
but you may want to switch it off if you have programs that don't return any
respawn checktime { yes | no | TIME }
.Bd -filled -offset indent
should assume that children that did not live longer than TIME seconds
were failing. The default is yes, which is equivalent to a time of 5 seconds.
The UNIX kernel sets up the environment for
as part of its initialisation.
is called without any files open.
.Bl -tag -width "/etc/init.conf" -compact
specifies on which terminals to create login processes
If it cannot open a connectoin to a syslogd, it prints the message
to the console. Fatal errors (such as a segmentaion fault) cause
the kernel to panic with the message "init died".
was written by Christoph Robitschko for the 386BSD project.
\&... should be reported to <chmr@edvz.tu-graz.ac.at>