dracut-module-setup: Fix test for inclusion of DRM modules

The /sys/modules/*/drivers sysfs entries do not exist anymore on newer
kernels which means that the DRM moduels would never be included.
Instead check if there is any device with a "drm" sysfs directory to
decide on whether DRM modules need to be included.

Acked-by: Dave Young <dyoung@redhat.com>
This commit is contained in:
Benjamin Berg 2017-05-15 15:00:51 +02:00 committed by Dave Young
parent dcbab02752
commit f6303a2a93

View File

@ -20,7 +20,7 @@ check() {
depends() {
local _dep="base shutdown"
if [ -d /sys/module/drm/drivers ]; then
if [ -n "$( find /sys/devices -name drm )" ]; then
_dep="$_dep drm"
fi