Blame 0022-dracut-functions.sh-find_kernel_modules_by_path-fixe.patch

Harald Hoyer 2d3fda
From 194b80f974751b2eb5e6f50075d150b9c8083b77 Mon Sep 17 00:00:00 2001
Harald Hoyer 2d3fda
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 2d3fda
Date: Mon, 2 Jul 2012 22:51:24 +0200
Harald Hoyer 2d3fda
Subject: [PATCH] dracut-functions.sh:find_kernel_modules_by_path() fixed
Harald Hoyer 2d3fda
 hostonly part
Harald Hoyer 2d3fda
Harald Hoyer 2d3fda
filter /sys/module/* modules by path
Harald Hoyer 2d3fda
---
Harald Hoyer 2d3fda
 dracut-functions.sh |    6 +++++-
Harald Hoyer 2d3fda
 1 file changed, 5 insertions(+), 1 deletion(-)
Harald Hoyer 2d3fda
Harald Hoyer 2d3fda
diff --git a/dracut-functions.sh b/dracut-functions.sh
Harald Hoyer 2d3fda
index 2898c30..6de7c72 100755
Harald Hoyer 2d3fda
--- a/dracut-functions.sh
Harald Hoyer 2d3fda
+++ b/dracut-functions.sh
Harald Hoyer 2d3fda
@@ -1277,7 +1277,11 @@ find_kernel_modules_by_path () (
Harald Hoyer 2d3fda
         IFS=$_OLDIFS
Harald Hoyer 2d3fda
     else
Harald Hoyer 2d3fda
         ( cd /sys/module; echo *; ) \
Harald Hoyer 2d3fda
-        | xargs -r modinfo -F filename -k $kernel 2>/dev/null
Harald Hoyer 2d3fda
+        | xargs -r modinfo -F filename -k $kernel 2>/dev/null \
Harald Hoyer 2d3fda
+        | while read a; do
Harald Hoyer 2d3fda
+            [[ $a = kernel*/$1/* ]] || continue
Harald Hoyer 2d3fda
+            echo $srcmods/$a
Harald Hoyer 2d3fda
+        done
Harald Hoyer 2d3fda
     fi
Harald Hoyer 2d3fda
     return 0
Harald Hoyer 2d3fda
 )