Blob Blame History Raw
From 48e4a9a11c3d1ccd138e8a6dbea68010f47a1359 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 22 Jun 2012 15:10:11 +0200
Subject: [PATCH] dracut-functions.sh:find_kernel_modules_by_path() use IFS=:

For modules.dep use simpler IFS=: to read the file.
---
 dracut-functions.sh |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dracut-functions.sh b/dracut-functions.sh
index 9861bb7..cecd59a 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -1115,17 +1115,22 @@ for_each_kmod_dep() {
 
 
 find_kernel_modules_by_path () (
+    local _OLDIFS
     if ! [[ $hostonly ]]; then
+        _OLDIFS=$IFS
+        IFS=:
         while read a rest; do
             if [[ "${a##kernel}" != "$a" ]]; then
                 [[ "${a##kernel/$1}" != "$a" ]] || continue
             fi
-            echo $srcmods/${a%:}
+            echo $srcmods/$a
         done < $srcmods/modules.dep
+        IFS=$_OLDIFS
     else
         ( cd /sys/module; echo *; ) \
         | xargs modinfo -F filename -k $kernel 2>/dev/null
     fi
+    return 0
 )
 
 find_kernel_modules () {