summaryrefslogtreecommitdiffstats
path: root/modules.d/50drm/module-setup.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 14:01:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 14:01:36 +0000
commit70de5d4041249c1a0f597714398cc245f59495c6 (patch)
treeff491e31b95b662ca6c481ac49d1ca8a94c0226b /modules.d/50drm/module-setup.sh
parentAdding debian version 060+5-8. (diff)
downloaddracut-70de5d4041249c1a0f597714398cc245f59495c6.tar.xz
dracut-70de5d4041249c1a0f597714398cc245f59495c6.zip
Merging upstream version 102.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xmodules.d/50drm/module-setup.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh
index 1fb3867..43a99e8 100755
--- a/modules.d/50drm/module-setup.sh
+++ b/modules.d/50drm/module-setup.sh
@@ -29,18 +29,22 @@ installkernel() {
# as we could e.g. be in the installer; nokmsboot boot parameter will disable
# loading of the driver if needed
if [[ $hostonly ]]; then
+ local -a _mods
local i modlink modname
for i in /sys/bus/{pci/devices,platform/devices,virtio/devices,soc/devices/soc?,vmbus/devices}/*/modalias; do
[[ -e $i ]] || continue
[[ -n $(< "$i") ]] || continue
- # shellcheck disable=SC2046
- if hostonly="" dracut_instmods --silent -s "drm_crtc_init|drm_dev_register|drm_encoder_init" -S "iw_handler_get_spy" $(< "$i"); then
- if strstr "$(modinfo -F filename $(< "$i") 2> /dev/null)" radeon.ko; then
+ mapfile -t -O "${#_mods[@]}" _mods < "$i"
+ done
+ if ((${#_mods[@]})); then
+ # shellcheck disable=SC2068
+ if hostonly="" dracut_instmods --silent -o -s "drm_crtc_init|drm_dev_register|drm_encoder_init" -S "iw_handler_get_spy" ${_mods[@]}; then
+ if strstr "$(modinfo -F filename "${_mods[@]}" 2> /dev/null)" radeon.ko; then
hostonly='' instmods amdkfd
fi
fi
- done
+ fi
# if there is a privacy screen then its driver must be loaded before the
# kms driver will bind, otherwise its probe() will return -EPROBE_DEFER
# note privacy screens always register, even with e.g. nokmsboot