summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2023-10-16 08:35:59 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2023-10-16 08:35:59 +0100
commit1ed3dc01c1b7e12e6ae824c589f76c32e767ba5d (patch)
treedd3ceae76805497f7979451c412dad554b50ddc9
parentc83c5500266e9a3f69f17799b4c554095593bdd7 (diff)
install/autodetect: match non-empty tokens
Original awk code was picking empty MODALIAS= lines. Seemingly some kernel modules produce an empty DRIVER= one as well. Match on non-empty ones. It makes no difference wrt the follow-up modprobe, although it's the sane thing to do. 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 24e8382..918cdd8 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/\(DRIVER\|MODALIAS\)=\(.*\)/\2/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[@]//-/_}"