Hakchi:/etc/preinit.d

From hakchi
Jump to: navigation, search

The preinit.d folder contains script files that are concatenated into a single file which is then executed, as such, every file must have an empty line at the end or concatenation will fail and will result in failure to boot.

There are two types of files in this folder, both are included at different times

Naming convention[edit source]

Every file must start with either p or b followed by four alphanumeric characters, they are included alphabetically, so b0000_defines would run first followed by b0010_functions

b files[edit source]

These files should only contain function or variable definitions and should not contain code that executes.

They will be included every time script_init is called which includes the preinit boot phase and any time /bin/hakchi is run.

p files[edit source]

These files can contain any kind of script and will be run only during the preinit boot phase.