summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2016-01-25 16:59:21 +0000
committerBen Hutchings <ben@decadent.org.uk>2016-01-25 17:16:35 +0000
commit3ff5d57fd84c93e14c4dec2067d1dfc86e07d316 (patch)
tree687c974b8d6e851d7e6801b8cb28194fbc29bc3f
parent941429d64e53a825d57417c25e2d60a750cd3708 (diff)
initramfs-tools.8: Add brief description of configuration hooks and files
Closes: #807527 Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--initramfs-tools.821
1 files changed, 21 insertions, 0 deletions
diff --git a/initramfs-tools.8 b/initramfs-tools.8
index ba00295..e6bc5e2 100644
--- a/initramfs-tools.8
+++ b/initramfs-tools.8
@@ -130,6 +130,10 @@ loads generic IDE/ATA chipset support on boot.
Valid boot and hook scripts names consist solely of alphabetics, numerics,
dashes and underscores. Other scripts are discarded.
+.SS Configuration hook scripts
+These are used to override the user configuration where necessary, for
+example to force use of busybox instead of klibc utilities.
+
.SS Hook scripts
These are used when an initramfs image is created and not included in the
image itself. They can however cause files to be included in the image.
@@ -142,6 +146,18 @@ kernel boot in the early user-space before the root partition has been
mounted.
+.SH CONFIGURATION HOOK SCRIPTS
+
+Configuration hook scripts can be found in
+/usr/share/initramfs-tools/conf-hooks.d. They are sourced by
+mkinitramfs after the configuration files in /etc and before running
+any hook scripts. They can override any of the variables documented
+in \fIinitramfs.conf\fR(5), but this should be done only if absolutely
+necessary. For example, if a package's boot script requires commands
+not provided by klibc-utils, it should also install a configuration
+hook that sets \fBBUSYBOX=y\fR.
+
+
.SH HOOK SCRIPTS
Hooks can be found in two places: /usr/share/initramfs-tools/hooks and
@@ -156,6 +172,11 @@ according to \fBtheir\fR PREREQ values and executed. This mean that currently
there is no possibility to have a local script (/etc/initramfs-tools) get
executed before one from the package (/usr/share/initramfs-tools).
+If a hook script requires configuration beyond the exported variables
+listed below, it should read a private configuration file that is
+separate from the /etc/initramfs-tools directory. It \fImust not\fR
+read initramfs-tools configuration files directly.
+
.SS Header
In order to support prereqs, each script should begin with the following lines: