]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Fix firmware installation.
authorVictor Lowther <victor.lowther@gmail.com>
Fri, 29 May 2009 02:13:16 +0000 (21:13 -0500)
committerVictor Lowther <victor.lowther@gmail.com>
Fri, 29 May 2009 02:13:16 +0000 (21:13 -0500)
Instead of calling firmware checking once per instmods invocation,
call only when we install an actual module on the initramfs.

dracut-functions

index 1e3f89162607a2995ed5e284270521522fa75723..3ef664e422be5d9ac5b657300551899de7c2277b 100755 (executable)
@@ -261,8 +261,8 @@ instmods() {
        case $mod in
            =*) # This introduces 2 incompatible meanings for =* arguments
                 # to instmods.  We need to decide which one to keep.
-                if [ "$mod" = "=ata" -a -f $srcmods/modules.block ] ; then 
-                    instmods $mpargs $(egrep 'ata|ahci' "${srcmods}/modules.block")
+               if [ "$mod" = "=ata" -a -f $srcmods/modules.block ] ; then 
+                   instmods $mpargs $(egrep 'ata|ahci' "${srcmods}/modules.block")
                elif [ -f $srcmods/modules.${mod#=} ]; then
                    instmods $mpargs $(cat ${srcmods}/modules.${mod#=} )
                else
@@ -283,18 +283,18 @@ instmods() {
                        continue
                    fi
                    inst_simple "$modpath"
+                   for fw in $(/sbin/modinfo -F firmware $mod 2>/dev/null); do
+                       if [ -f /lib/firmware/$fw ]; then
+                           inst_simple "/lib/firmware/$fw"
+                       else
+                           dwarning "Possible missing firmware /lib/firmware/${fw} for module ${mod}.ko"
+                       fi
+                   done
                done
                ;;
-       esac
+       esac      
        shift
     done
-    for fw in $(/sbin/modinfo -F firmware $mod 2>/dev/null); do
-        if [ -f /lib/firmware/$fw ]; then
-            inst_simple "/lib/firmware/$fw"
-       else
-           dwarning "Possible missing firmware /lib/firmware/${fw} for module $(basename ${mod} .ko)"
-        fi
-    done
 } 
 
 # vim:ts=8:sw=4:sts=4:et