From: Peter Jones Date: Mon, 23 Nov 2009 15:15:56 +0000 (-0500) Subject: Handle modules with hyphens in their names properly. X-Git-Tag: 003~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c761b26aef576bcf45cedeb304e633e741e1e5a2;p=thirdparty%2Fdracut.git Handle modules with hyphens in their names properly. 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. --- diff --git a/dracut-functions b/dracut-functions index 331b723c6..df239a581 100755 --- a/dracut-functions +++ b/dracut-functions @@ -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