]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-functions: add additional drivers in host-only mode, too
authorLuca Berra <bluca@comedia.it>
Wed, 13 Jan 2010 15:02:10 +0000 (16:02 +0100)
committerHarald Hoyer <harald@redhat.com>
Wed, 13 Jan 2010 15:02:10 +0000 (16:02 +0100)
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)

dracut-functions

index e2b8012704d0f74c301ff76fa9bbd022a9762343..16b7d3de93bb44d56fa64efbe385ad57a4905e56 100755 (executable)
@@ -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