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

Benjamin Berg benjamin at sipsolutions.net
Mon May 15 04:31:40 PDT 2017


From: Benjamin Berg <bberg at redhat.com>

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.
---
 dracut-module-setup.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index 9f88b4e..8495fd9 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -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
 
-- 
2.9.3




More information about the kexec mailing list