summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2023-10-11 10:46:55 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2023-10-14 12:36:22 +0100
commit9e505a5308181ca3759c8d6bdbc905041429110b (patch)
tree6f7cc8ee4c6a1a968f72166967cb06357c47d743
parentb8f91b24e32d0dbf4de9a3d3e12ca38040a79908 (diff)
install/autodetect: pass the kernel version to modprobe
Without the -S $KERNELVERSION we end pulling the module details for the currently running kernel - not the one we're building initrd for. While here, drop the stderr redirection and use the -q flag. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
-rw-r--r--install/autodetect2
1 files changed, 1 insertions, 1 deletions
diff --git a/install/autodetect b/install/autodetect
index 61422b0..4ec69f3 100644
--- a/install/autodetect
+++ b/install/autodetect
@@ -13,7 +13,7 @@ build() {
# treat this as an alias, since ext3 might be aliased to ext4. also, as
# of linux 3.9, we can find any filesystem by the alias "fs-$name"
# rather than having to guess at the corresponding module name.
- mapfile -t resolved < <(modprobe -Ra {fs-,}"$1" 2>/dev/null)
+ mapfile -t resolved < <(modprobe -S "$KERNELVERSION" -qaR {fs-,}"$1")
for r in "${resolved[@]}"; do
_autodetect_cache["$r"]=1