commit:     1ffe1409c796372459a4985f8fe3f10fffe6e816
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 18 22:31:50 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Feb 18 22:31:50 2021 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=1ffe1409

gen_moddeps.sh: modules_dep_list(): match module more precise

The current pattern is not precise enough. I.e. when looking for
Realtek network driver module (realtek.ko), we also get a match on
Realtek HD audio codec module (snd-hda-codec-realtek.ko).

This commit will make the pattern more precise.

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 gen_moddeps.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gen_moddeps.sh b/gen_moddeps.sh
index fd7800f..193338d 100755
--- a/gen_moddeps.sh
+++ b/gen_moddeps.sh
@@ -50,7 +50,7 @@ modules_dep_list() {
        KEXT=$(modules_kext)
        if [ -f "${KERNEL_MODULES_PREFIX%/}/lib/modules/${KV}/modules.dep" ]
        then
-               cat "${KERNEL_MODULES_PREFIX%/}/lib/modules/${KV}/modules.dep" 
| grep ${1}${KEXT}\: | cut -d\:  -f2
+               grep -F -- "/${1}${KEXT}:" 
"${KERNEL_MODULES_PREFIX%/}/lib/modules/${KV}/modules.dep" | cut -d\:  -f2
        fi
 }
 

Reply via email to