Difference between revisions of "Hakchi:/etc/preinit.d"

From hakchi
Jump to: navigation, search
m (DanTheMan827 moved page Hakchi:/etc/preinit.d/ to Hakchi:/etc/preinit.d)
Line 1: Line 1:
 
[[Category:Hakchi Files and Folders]]
 
[[Category:Hakchi Files and Folders]]
 +
The preinit.d folder contains script files that are concatenated into a single file which is then executed
 +
 +
There are two types of files in this folder, both are included at different times
 +
 +
== Naming convention ==
 +
Every file must start with either p or b followed by four alphanumeric characters, they are included alphabetically, so <code>[[Hakchi:/etc/preinit.d/b0000_defines|b0000_defines]]</code> would run first followed by <code>[[Hakchi:/etc/preinit.d/b0010_functions|b0010_functions]]</code>
 +
 +
=== b files ===
 +
These files should only contain function or variable definitions and should not contain code that executes.
 +
 +
They will be included every time [[Hakchi:/etc/preinit#script_init|script_init]] is called which includes the [[preinit]] [[Boot Phases|boot phase]] and any time <code>[[Hakchi:/bin/hakchi|/bin/hakchi]]</code> is run.
 +
 +
=== p files ===
 +
These files can contain any kind of script and will be run only during the [[preinit]] [[Boot Phases|boot phase]].

Revision as of 17:08, 30 May 2018

The preinit.d folder contains script files that are concatenated into a single file which is then executed

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

Naming convention

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

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

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