]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
plymouth: Include kms modules even if they are not currently loaded.
authorAnssi Hannula <anssi@mageia.org>
Sat, 3 Dec 2011 11:25:45 +0000 (11:25 +0000)
committerHarald Hoyer <harald@redhat.com>
Mon, 9 Jan 2012 12:28:29 +0000 (13:28 +0100)
This should fix initial initrd generation during install.
If the modules are not desired to be used, the nokmsboot kernel
command line should disable them.

modules.d/50plymouth/module-setup.sh

index 4ea925e9aed681e10fd5a87cd3130cac6e684a00..df0e8d6007984f6e282e6729f52678a952c92798 100755 (executable)
@@ -14,7 +14,17 @@ installkernel() {
     local _modname
     # Include KMS capable drm drivers
     for _modname in $(find "$srcmods/kernel/drivers/gpu/drm" "$srcmods/extra" \( -name '*.ko' -o -name '*.ko.gz' \) 2>/dev/null); do
-        zgrep -q drm_crtc_init  $_modname && instmods $_modname
+        if zgrep -q drm_crtc_init  $_modname; then
+            # if the hardware is present, include module even if it is not currently loaded,
+            # as we could e.g. be in the installer; nokmsboot boot parameter will disable
+            # loading of the driver if needed
+            if [[ $hostonly ]] && modinfo -F alias $_modname | sed -e 's,\?,\.,g' -e 's,\*,\.\*,g' \
+                                  | grep -qxf - /sys/bus/pci/devices/*/modalias; then
+                hostonly='' instmods $_modname
+                continue
+            fi
+            instmods $_modname
+        fi
     done
 }