aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2021-11-15 01:19:31 +0100
committerThomas Deutschmann <whissi@gentoo.org>2021-11-15 02:24:49 +0100
commitc790b6e2c5bd4841a7469bdd8f6e3eee8bf82453 (patch)
tree21aca58a5244a7004b2bb66a9f6375a0aae173f1 /gen_determineargs.sh
parentgen_initramfs.sh: append_dropbear: NSS files module was merged into libc in >... (diff)
downloadgenkernel-c790b6e2c5bd4841a7469bdd8f6e3eee8bf82453.tar.gz
genkernel-c790b6e2c5bd4841a7469bdd8f6e3eee8bf82453.tar.bz2
genkernel-c790b6e2c5bd4841a7469bdd8f6e3eee8bf82453.zip
gen_determineargs.sh: determine_real_args(): Make kmod only required for non-static kernels
Fixes: 153a877d ("Refactor (compressed) kernel module handling") Bug: https://bugs.gentoo.org/821484 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gen_determineargs.sh')
-rwxr-xr-xgen_determineargs.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/gen_determineargs.sh b/gen_determineargs.sh
index 027c696..07b2202 100755
--- a/gen_determineargs.sh
+++ b/gen_determineargs.sh
@@ -314,12 +314,6 @@ determine_real_args() {
gen_die "'realpath -m /' failed. We need a realpath version which supports '-m' mode!"
fi
- KMOD_CMD=$(which kmod 2>/dev/null)
- if [ -z "${KMOD_CMD}" ]
- then
- gen_die "kmod not found. Is sys-apps/kmod installed?"
- fi
-
if hash grep &>/dev/null
then
GREP_CMD=grep
@@ -1233,6 +1227,15 @@ determine_real_args() {
fi
fi
+ KMOD_CMD=$(which kmod 2>/dev/null)
+ if ! isTrue "${BUILD_STATIC}"
+ then
+ if [ -z "${KMOD_CMD}" ]
+ then
+ gen_die "kmod not found. Is sys-apps/kmod installed?"
+ fi
+ fi
+
if ! isTrue "${CMD_INSTALL}"
then
if [ -n "${KERNEL_MODULES_PREFIX}" ]