]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix: load essential storage kernel modules in sloppy hostonly mode
authorJo Zzsi <jozzsicsataban@gmail.com>
Sat, 24 May 2025 01:56:56 +0000 (21:56 -0400)
committerLaszlo <laszlo.gombos@gmail.com>
Mon, 28 Jul 2025 21:23:05 +0000 (17:23 -0400)
Essential storage kernel modules (e.g. sd_mod) should be
always included unless hostonly_mode is set to strict.

This PR installs even more drivers in hostonly sloppy mode
as a follow-up to 8519dcd .

Fixes: https://github.com/dracut-ng/dracut-ng/issues/748
modules.d/70kernel-modules/module-setup.sh

index ad0d4ab7f5a2eedfed92177eff9dccac160583b0..e4bfaf6e977d5493079a5e5f605ec3a53cc375bc 100755 (executable)
@@ -107,9 +107,9 @@ installkernel() {
 
         awk -F: '/^\// {print $1}' "$srcmods/modules.dep" 2> /dev/null | instmods
 
-        # if not on hostonly mode, or there are hostonly block device
+        # if not on strict hostonly mode, or there are hostonly block device
         # install block drivers
-        if ! [[ ${hostonly-} ]] \
+        if [[ $hostonly_mode != "strict" ]] \
             || for_each_host_dev_and_slaves_all record_block_dev_drv; then
             hostonly='' instmods sg sr_mod sd_mod scsi_dh ata_piix