]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-functions.sh:find_kernel_modules_by_path() use IFS=:
authorHarald Hoyer <harald@redhat.com>
Fri, 22 Jun 2012 13:10:11 +0000 (15:10 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 29 Jun 2012 10:41:25 +0000 (12:41 +0200)
For modules.dep use simpler IFS=: to read the file.

dracut-functions.sh

index 9861bb799de880a16bbb8c73f8001b052d85ee47..cecd59a4a98293013cb176c2c9306096c43dd6f7 100755 (executable)
@@ -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 () {