dracut-functions.sh:find_kernel_modules_by_path() fixed hostonly part
authorHarald Hoyer <harald@redhat.com>
Mon, 2 Jul 2012 20:51:24 +0000 (22:51 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 2 Jul 2012 20:51:24 +0000 (22:51 +0200)
filter /sys/module/* modules by path

dracut-functions.sh

index 2898c30..6de7c72 100755 (executable)
@@ -1277,7 +1277,11 @@ find_kernel_modules_by_path () (
         IFS=$_OLDIFS
     else
         ( cd /sys/module; echo *; ) \
-        | xargs -r modinfo -F filename -k $kernel 2>/dev/null
+        | xargs -r modinfo -F filename -k $kernel 2>/dev/null \
+        | while read a; do
+            [[ $a = kernel*/$1/* ]] || continue
+            echo $srcmods/$a
+        done
     fi
     return 0
 )