]> git.nbdom.net Git - nb.git/commitdiff
modprobe_ls() search for *.ko.xz as well as *.ko
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 14 Apr 2023 16:43:37 +0000 (18:43 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 14 Apr 2023 16:43:37 +0000 (18:43 +0200)
etc/profile.d/linux.sh

index afb4f90a85459a2d120a9a1d9c947cf8fe692c66..36e3a082108a8c281e17be76ae2b56604da7f4a8 100644 (file)
@@ -1,5 +1,9 @@
 case "$OSTYPE" in linux*) [ 1 ] ;; *) return ;; esac
 
 modprobe_ls() {
-       find /lib/modules/$(uname -r) -type f -name '*.ko' | sed -E -e 's,^.*/([^/]+)\.ko$,\1,' | grep "${1:-^}"
+       find /lib/modules/$(uname -r) \
+               -type f -name '*.ko' \
+               -or \
+               -type f -name '*.ko.xz' \
+               | sed -E -e 's,^.*/([^/]+)\.ko(.xz)?$,\1,' | grep "${1:-^}"
 }