diff options
author | Emil Velikov <emil.l.velikov@gmail.com> | 2023-10-16 08:35:59 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2023-10-16 08:35:59 +0100 |
commit | 1ed3dc01c1b7e12e6ae824c589f76c32e767ba5d (patch) | |
tree | dd3ceae76805497f7979451c412dad554b50ddc9 | |
parent | c83c5500266e9a3f69f17799b4c554095593bdd7 (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/autodetect | 2 |
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[@]//-/_}" |