From: Luca Berra Date: Wed, 13 Jan 2010 15:02:10 +0000 (+0100) Subject: dracut-functions: add additional drivers in host-only mode, too X-Git-Tag: 004~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=74c5dd215817229cf997b7ebbbe60de3b57f9b2f;p=thirdparty%2Fdracut.git dracut-functions: add additional drivers in host-only mode, too 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) --- diff --git a/dracut-functions b/dracut-functions index e2b801270..16b7d3de9 100755 --- a/dracut-functions +++ b/dracut-functions @@ -499,7 +499,8 @@ 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 && \ + ! echo $add_drivers | grep -qe "\<${mod}\>" && { shift; continue; } # ok, load the module, all its dependencies, and any firmware