summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/attachments/20111202/e9786565/attachment-0001.bin
blob: d6a6b2c4e421582ba9674e198a51da5ebcfd72ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- /usr/share/dracut/modules.d/50plymouth/module-setup.sh-OLD	2011-12-02 12:43:22.000000000 +0200
+++ /usr/share/dracut/modules.d/50plymouth/module-setup.sh	2011-12-02 22:40:03.525836233 +0200
@@ -14,7 +14,17 @@
     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
 }