Skip to content

Commit

Permalink
doc: Document script directories.
Browse files Browse the repository at this point in the history
  • Loading branch information
behrmann committed Sep 27, 2024
1 parent 0379474 commit b8dfbbe
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions mkosi/resources/man/mkosi.md
Original file line number Diff line number Diff line change
Expand Up @@ -2156,6 +2156,22 @@ image using `mkosi-chroot` (see below) before executing the script. For
example, if `mkosi.postinst.chroot` exists, mkosi will chroot into the
image and execute it as the post-installation script.

Instead of a single file script, mkosi will also read all files in lexicographical order from appropriately
named `.d` directories, e.g. all files in a `mkosi.build.d` would be used as build scripts. This is supported
by

* `mkosi.sync.d`,
* `mkosi.prepare.d`,
* `mkosi.build.d`,
* `mkosi.postinst.d`,
* `mkosi.finalize.d`,
* `mkosi.postoutput.d`, and
* `mkosi.clean.d`.

This can be combined with the `.chroot` extension, e.g. `mkosi.build.d/01-foo.sh` would be run without
chrooting into the image and `mkosi.build.d/02-bar.sh.chroot` would be run after chrooting into the image
first.

Scripts executed by mkosi receive the following environment variables:

* `$ARCHITECTURE` contains the architecture from the `Architecture=`
Expand Down

0 comments on commit b8dfbbe

Please sign in to comment.