this makes dracut load kernel module specified in add-drivers even
if building an host-only mkinitrd, it is useful in cases where we
might change some storage drivers and still don't want to build
an enormous initrd (e.g. ahci/ata_piix)
[[ -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 && \
+ ! echo $add_drivers | grep -qe "\<${mod}\>" && {
shift; continue;
}
# ok, load the module, all its dependencies, and any firmware