| script(4) | Erlang Module Definition | script(4) |
NAME
script - Boot script
DESCRIPTION
The boot script describes how the Erlang runtime system is started. It contains instructions for which code to load, and which processes and applications to start.
Command erl -boot Name starts the system with a boot file called Name.boot, which is generated from the Name.script file, using systools:script2boot/1.
The .script file is generated by systools from a .rel file and from .app files.
File Syntax
The boot script is stored in a file with extension .script. The file has the following syntax:
-
{script, {Name, Vsn}, [ {progress, loading}, {preLoaded, [Mod1, Mod2, ...]}, {path, [Dir1,"$ROOT/Dir",...]}. {primLoad, [Mod1, Mod2, ...]}, ... {kernel_load_completed}, {progress, loaded}, {kernelProcess, Name, {Mod, Func, Args}}, ... {apply, {Mod, Func, Args}}, ... {progress, started}]}.Name = string()
Vsn = string()
{progress, Term}
{path, [Dir]}
Dir is a string. This argument sets the load path of the system to [Dir]. The load path used to load modules is obtained from the initial load path, which is given in the script file, together with any path flags that were supplied in the command-line arguments. The command-line arguments modify the path as follows:
{primLoad, [Mod]}
{kernel_load_completed}
{kernelProcess, Name, {Mod, Func, Args}}
{apply, {Mod, Func, Args}}.
NOTE: In an interactive system, the code loader provides demand-driven code loading, but in an embedded system the code loader loads all code immediately. The same version of code is used in both cases. The code server calls init:get_argument(mode) to determine if it is to run in demand mode or non-demand driven mode.
See Also
systools
| sasl 4.3 | Ericsson AB |