Blame 0071-dracut-functions.sh-find_kernel_modules_by_path-use-.patch

Harald Hoyer 53e990
From 48e4a9a11c3d1ccd138e8a6dbea68010f47a1359 Mon Sep 17 00:00:00 2001
Harald Hoyer 53e990
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 53e990
Date: Fri, 22 Jun 2012 15:10:11 +0200
Harald Hoyer 53e990
Subject: [PATCH] dracut-functions.sh:find_kernel_modules_by_path() use IFS=:
Harald Hoyer 53e990
Harald Hoyer 53e990
For modules.dep use simpler IFS=: to read the file.
Harald Hoyer 53e990
---
Harald Hoyer 53e990
 dracut-functions.sh |    7 ++++++-
Harald Hoyer 53e990
 1 file changed, 6 insertions(+), 1 deletion(-)
Harald Hoyer 53e990
Harald Hoyer 53e990
diff --git a/dracut-functions.sh b/dracut-functions.sh
Harald Hoyer 53e990
index 9861bb7..cecd59a 100755
Harald Hoyer 53e990
--- a/dracut-functions.sh
Harald Hoyer 53e990
+++ b/dracut-functions.sh
Harald Hoyer 53e990
@@ -1115,17 +1115,22 @@ for_each_kmod_dep() {
Harald Hoyer 53e990
 
Harald Hoyer 53e990
 
Harald Hoyer 53e990
 find_kernel_modules_by_path () (
Harald Hoyer 53e990
+    local _OLDIFS
Harald Hoyer 53e990
     if ! [[ $hostonly ]]; then
Harald Hoyer 53e990
+        _OLDIFS=$IFS
Harald Hoyer 53e990
+        IFS=:
Harald Hoyer 53e990
         while read a rest; do
Harald Hoyer 53e990
             if [[ "${a##kernel}" != "$a" ]]; then
Harald Hoyer 53e990
                 [[ "${a##kernel/$1}" != "$a" ]] || continue
Harald Hoyer 53e990
             fi
Harald Hoyer 53e990
-            echo $srcmods/${a%:}
Harald Hoyer 53e990
+            echo $srcmods/$a
Harald Hoyer 53e990
         done < $srcmods/modules.dep
Harald Hoyer 53e990
+        IFS=$_OLDIFS
Harald Hoyer 53e990
     else
Harald Hoyer 53e990
         ( cd /sys/module; echo *; ) \
Harald Hoyer 53e990
         | xargs modinfo -F filename -k $kernel 2>/dev/null
Harald Hoyer 53e990
     fi
Harald Hoyer 53e990
+    return 0
Harald Hoyer 53e990
 )
Harald Hoyer 53e990
 
Harald Hoyer 53e990
 find_kernel_modules () {