From c761b26aef576bcf45cedeb304e633e741e1e5a2 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 23 Nov 2009 10:15:56 -0500 Subject: 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. --- dracut-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dracut-functions b/dracut-functions index 331b723..df239a5 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 -- cgit v1.2.3