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.
[[ -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