You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+15-4Lines changed: 15 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -469,7 +469,14 @@ This module is loaded in the imports section of the `base.yaml` file:
469
469
"ugrd.fs.mounts" = [ "_process_mounts_multi" ]
470
470
```
471
471
472
-
#### build_tasks
472
+
#### Imports
473
+
474
+
UGRD allows functions to be imported from modules using the `imports` dict.
475
+
476
+
This is primarily used to run additional functions at build time, add init functions, and add library functions.
477
+
478
+
479
+
##### build_tasks
473
480
474
481
Build tasks are functions which will be executed after the directory structure has been generated using the specified `paths`.
475
482
@@ -480,7 +487,7 @@ The base module includes a build task for generating the fstab, which is activat
480
487
"ugrd.fs.mounts" = [ "generate_fstab" ]
481
488
```
482
489
483
-
####Packing tasks
490
+
##### pack
484
491
485
492
Packing facts, such as CPIO generation can be defined in the `pack` import.
486
493
@@ -491,7 +498,11 @@ The `cpio` module imports the `make_cpio_list` packing function with:
491
498
"ugrd.base.base" = [ "make_cpio_list" ]
492
499
```
493
500
494
-
#### init hooks
501
+
##### funcs
502
+
503
+
Functions can be added to `imports.funcs` to force the output to be added to `init_funcs.sh`.
504
+
505
+
##### init hooks
495
506
496
507
By default, the specified init hooks are:
497
508
*`init_pre` - Where the base initramfs environment is set up, such as creating a devtmpfs.
@@ -514,7 +525,7 @@ The `InitramfsGenerator.generate_init_main()` function (often called from `self`
514
525
515
526
A general overview of the procedure used for generating the init is to write the chosen `shebang`, then every init hook. The `custom_init` import can be used for more advanced confugrations, such as running another script in `agetty`.
516
527
517
-
#### custom_init
528
+
#####custom_init
518
529
519
530
To change how everything but `init_pre` and `init_file` are handled at runtime, `custom_init` can be used.
0 commit comments