]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Handle modules with hyphens in their names properly.
authorPeter Jones <pjones@redhat.com>
Mon, 23 Nov 2009 15:15:56 +0000 (10:15 -0500)
committerPeter Jones <pjones@redhat.com>
Wed, 25 Nov 2009 18:40:22 +0000 (13:40 -0500)
If a module has a hyphen in its name, it will show up as an underscore
in /proc/modules.  Because of this, when we're testing /proc/modules,
we have to munge our module filename expression to match.

dracut-functions

index 331b723c6a9bc2393f5cc5a0ca5e1fadeca34c09..df239a581d3b4f881f43c84cf96637409a8256fd 100755 (executable)
@@ -488,7 +488,7 @@ instmods() {
                [[ -f $initdir/$1 ]] && { shift; continue; }
                # If we are building a host-specific initramfs and this
                # module is not already loaded, move on to the next one.
-               [[ $hostonly ]] && ! grep -q "$mod" /proc/modules && { 
+               [[ $hostonly ]] && ! grep -q "${mod//-/_}" /proc/modules && {
                    shift; continue; 
                }
                # ok, load the module, all its dependencies, and any firmware