1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

Document the init_chroot and init_script variables.

# I didn't check the markup too closely, so doc people, please check

Submitted by: Oliver Fromme
This commit is contained in:
Warner Losh 2007-02-04 06:35:10 +00:00
parent fbb42904c4
commit 6ae9968c9a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166486
2 changed files with 54 additions and 0 deletions

View File

@ -423,12 +423,63 @@ userland output (e.g.\& from
.It Va currdev
Selects the default device.
Syntax for devices is odd.
.It Va init_chroot
If set to a valid directory in the root file system, it causes
.Xr init 8
to perform a
.Xr chroot 2
operation on that directory, making it the new root directory.
That happens before entering single-user mode or multi-user
mode (but after executing the
.Va init_script
if enabled).
.It Va init_path
Sets the list of binaries which the kernel will try to run as the initial
process.
The first matching binary is used.
The default list is
.Dq Li /sbin/init:/sbin/oinit:/sbin/init.bak:\:/rescue/init:/stand/sysinstall .
.It Va init_script
If set to a valid file name in the root file system,
instructs
.Xr init 8
to run that script as the very first action,
before doing anything else.
Signal handling and exit code interpretation is similar to
running the
.Pa /etc/rc
script.
In particular, single-user operation is enforced
if the script terminates with a non-zero exit code,
or if a SIGTERM is delivered to the
.Xr init 8
process (PID 1).
.It Va init_script
Defines the shell binary to be used for executing the various shell scripts.
The default is
.Dq Li /bin/sh .
It is used for running the
.Va init_script
if set, as well as for the
.Pa /etc/rc
and
.Pa /etc/rc.shutdown
scripts.
The value of the corresponding
.Xr kenv 2
variable is evaluated every time
.Xr init 8
calls a shell script, so it can be changed later on using the
.Xr kenv 1
utility.
In particular, if a non-default shell is used for running an
.Va init_script ,
it might be desirable to have that script reset the value of
.Va init_shell
back to the default, so that the
.Pa /etc/rc
script is executed with the standard shell
.Pa /bin/sh .
.It Va interpret
Has the value
.Dq Li OK

View File

@ -77,6 +77,9 @@ module_path="/boot/modules" # Set the module search path
#boot_verbose="" # -v: Causes extra debugging information to be printed
#init_path="/sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init:/stand/sysinstall"
# Sets the list of init candidates
#init_shell="/bin/sh" # The shell binary used by init(8).
#init_script="" # Initial script to run by init(8) before chrooting.
#init_chroot="" # Directory for init(8) to chroot into.
##############################################################