From: Nicolas Boisselier Date: Fri, 14 Apr 2023 16:43:37 +0000 (+0200) Subject: modprobe_ls() search for *.ko.xz as well as *.ko X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=8ce647283673b435f95fabed6615035257eee02b;p=nb.git modprobe_ls() search for *.ko.xz as well as *.ko --- diff --git a/etc/profile.d/linux.sh b/etc/profile.d/linux.sh index afb4f90a..36e3a082 100644 --- a/etc/profile.d/linux.sh +++ b/etc/profile.d/linux.sh @@ -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:-^}" }