diff options
author | Emil Velikov <emil.l.velikov@gmail.com> | 2023-10-11 15:09:17 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2023-10-14 12:39:07 +0100 |
commit | c83c5500266e9a3f69f17799b4c554095593bdd7 (patch) | |
tree | ec7406ac256dae49e159c11ed109f36278ac06e7 | |
parent | bdf60d0d33eaccf5a9a5eb08e60f17c649b8ce94 (diff) |
install/autodetect: match on both MODALIAS and DRIVER
There are a handful of drivers which may be loaded but are missing a
MODALIAS entry, so match on both.
For example: on a couple of unrelated instances people have reported
that mkinitcpio is not adding the nvme driver to the initrd. As per
"modinfo nvme" the driver fits this case perfectly.
On my machine, this gets us from 54 unique modules to 62.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
-rw-r--r-- | install/autodetect | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/install/autodetect b/install/autodetect index 5832953..24e8382 100644 --- a/install/autodetect +++ b/install/autodetect @@ -13,7 +13,7 @@ build() { local mods=() mapfile -t mods < <(find /sys/devices -name uevent \ - -exec sort -u {} + | sed -n 's/MODALIAS=\(.*\)/\1/p') + -exec sort -u {} + | sed -n 's/\(DRIVER\|MODALIAS\)=\(.*\)/\2/p') mapfile -t mods < <(modprobe -S "$KERNELVERSION" -qaR "${mods[@]}" | sort -u) (( ${#mods[*]} )) && printf "%s\n" "${mods[@]//-/_}" |