Skip to contentSkip to conversation

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

PATCH In review Benjamin Berg 1 participant 2 messages May 15, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

From: Benjamin Berg <[email protected]>

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(-)
dracut-module-setup.sh +1 -1
index 9f88b4e..8495fd9 100755
@@ -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
 
Signature · 7 lines
2.9.3


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#1 lore raw

Sorry, obviously this was meant for the kexec-tools list instead of this one.

Benjamin

Quoted 17 lines · Benjamin Berg

From: Benjamin Berg <[email protected]>

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(-)
dracut-module-setup.sh +0 -0
index 9f88b4e..8495fd9 100755
@@ -20,7 +20,7 @@ check() {
  depends() {
Quoted 7 lines

     local _dep="base shutdown"

-    if [ -d /sys/module/drm/drivers ]; then
+    if [ -n "$( find /sys/devices -name drm )" ]; then _dep="$_dep drm"
     fi

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec