mirror of
https://salsa.debian.org/kernel-team/initramfs-tools.git
synced 2026-01-26 15:39:08 +00:00
mkinitramfs: Add -m argument to override MODULES setting
We shouldn't need to change the system configuration to test changes to initramfs-tools. It's possible to use the -d argument with a custom config directory this purpose, but testing different MODULES settings is necessary frequently enough that it deserves its own shortcut. Add a -m argument to mkinitramfs that overrides the MODULES setting. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
This commit is contained in:
parent
84e5c0f7da
commit
a89788e09c
@ -21,6 +21,7 @@ Options:
|
||||
-c compress Override COMPRESS setting in initramfs.conf.
|
||||
-d confdir Specify an alternative configuration directory.
|
||||
-l level Override COMPRESSLEVEL setting in initramfs.conf.
|
||||
-m modules Override MODULES setting in initramfs.conf.
|
||||
-k Keep temporary directory used to make the image.
|
||||
-o outfile Write to outfile.
|
||||
-r root Override ROOT setting in initramfs.conf.
|
||||
@ -36,7 +37,7 @@ usage_error()
|
||||
exit 2
|
||||
}
|
||||
|
||||
OPTIONS=$(getopt -o c:d:hl:ko:r:v --long help -n "$0" -- "$@") || usage_error
|
||||
OPTIONS=$(getopt -o c:d:hl:m:ko:r:v --long help -n "$0" -- "$@") || usage_error
|
||||
|
||||
eval set -- "$OPTIONS"
|
||||
|
||||
@ -62,6 +63,10 @@ while true; do
|
||||
compresslevel="$2"
|
||||
shift 2
|
||||
;;
|
||||
-m)
|
||||
modules="$2"
|
||||
shift 2
|
||||
;;
|
||||
-o)
|
||||
outfile="$2"
|
||||
shift 2
|
||||
@ -257,6 +262,7 @@ if [ -d "${outfile}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MODULES="${modules:-$MODULES}"
|
||||
MODULESDIR="/lib/modules/${version}"
|
||||
|
||||
if [ ! -e "${MODULESDIR}" ]; then
|
||||
|
||||
@ -55,6 +55,13 @@ Override the
|
||||
setting in
|
||||
.IR initramfs.conf .
|
||||
|
||||
.TP
|
||||
\fB\-m \fI modules
|
||||
Override the
|
||||
.B MODULES
|
||||
setting in
|
||||
.IR initramfs.conf .
|
||||
|
||||
.TP
|
||||
\fB\-o \fI outfile
|
||||
Write the image to
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user