1.0 KiB
1.0 KiB
Module interface:
May call the functions:
load_module ${mod_filename}
to depend on another module
May adjust the variables:
-
packages
(array of depspecs) packages to download and install -
cache_packages
(array of depspecs) packages to download but not install -
pre_install
(array ofuint:funcname
pairs) functions to call after${packages[@]}
and${cache_packages[@]}
are downloaded, but before${packages[@]}
are installed. The listed functions are called in numeric order of the provided number. Each function is called with the image mountpoint as an argument.You are encouraged to prefix your function names with
modulename:
to avoid naming conflicts. Typical use looks like:pre_install+=(99:mymodule:last_thing) mymodule:last_thing() { local arg_mountpoint=$2 # function body here }
-
post_install
(array ofuint:funcname
pairs) likepre_install
, functions to call but called after${packages[@]}
are installed.