diff options
author | imp <imp@FreeBSD.org> | 2007-02-04 06:35:10 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2007-02-04 06:35:10 +0000 |
commit | 98f50a3dfb06cb3bac2ec6f46d265c037ca5fc3d (patch) | |
tree | f0cd48e5d1866a79c288c6b5f342ec614f397fab /sys/boot/common | |
parent | 2088a69616fcc7d02d198087f76856402c7063c4 (diff) | |
download | FreeBSD-src-98f50a3dfb06cb3bac2ec6f46d265c037ca5fc3d.zip FreeBSD-src-98f50a3dfb06cb3bac2ec6f46d265c037ca5fc3d.tar.gz |
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
Diffstat (limited to 'sys/boot/common')
-rw-r--r-- | sys/boot/common/loader.8 | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/sys/boot/common/loader.8 b/sys/boot/common/loader.8 index ef7416f..ee9658f 100644 --- a/sys/boot/common/loader.8 +++ b/sys/boot/common/loader.8 @@ -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 |