source code: init/preinit.d/README.md
CrOS Factory Init: preinit.d¶
Script¶
002-override_jobs.sh¶
This script provides the override file functionality for init jobs. The file
under override_jobs
should be a valid init config, and will override the
stanzas in /etc/init/${JOB_NAME}.conf
.
See Override File Handling section in
init
manual
for details.
004-mount_bind_files.sh¶
This script provides a standard way to override system files with mount-bind. You can follow the flow to easily override system files with this script:
We use mount-bind mechanism to override system files with the files under the fake root:
FAKE_ROOT=/usr/local/factory/init/preinit.d/mount_bind_files/
. You can add additional files to the fake root of toolkit usingfactory_create_resource
inebuild
. Read the description in ebuild for more info.After adding the files to fake root, the factory init scripts will run this script automatically to recursively override the system files with the files under the fake root. e.g., it will overrides
/dir_1/dir_2/filename
with${FAKE_ROOT}/dir_1/dir_2/filename
.