ab92d3
From be22f63f7d7c62d88edb5a24dccfff2774094773 Mon Sep 17 00:00:00 2001
ab92d3
From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= <zboszor@pr.hu>
ab92d3
Date: Tue, 19 Jan 2021 15:17:05 +0100
ab92d3
Subject: [PATCH] fix(99squash): use kernel config instead of modprobe to check
ab92d3
 modules
ab92d3
MIME-Version: 1.0
ab92d3
Content-Type: text/plain; charset=UTF-8
ab92d3
Content-Transfer-Encoding: 8bit
ab92d3
ab92d3
Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
ab92d3
(cherry picked from commit 911c2de9c34a2e96be3973954d368d3a14eb6785)
ab92d3
ab92d3
Resolves: #1959336
ab92d3
---
ab92d3
 modules.d/99squash/module-setup.sh | 6 +++---
ab92d3
 1 file changed, 3 insertions(+), 3 deletions(-)
ab92d3
ab92d3
diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh
ab92d3
index e2fe3dd4..d3680d63 100644
ab92d3
--- a/modules.d/99squash/module-setup.sh
ab92d3
+++ b/modules.d/99squash/module-setup.sh
ab92d3
@@ -11,9 +11,9 @@ check() {
ab92d3
         return 1
ab92d3
     fi
ab92d3
 
ab92d3
-    for i in squashfs loop overlay; do
ab92d3
-        if ! check_kernel_module $i; then
ab92d3
-            derror "dracut-squash module requires kernel module $i"
ab92d3
+    for i in CONFIG_SQUASHFS CONFIG_BLK_DEV_LOOP CONFIG_OVERLAY_FS ; do
ab92d3
+        if ! check_kernel_config $i; then
ab92d3
+            derror "dracut-squash module requires kernel configuration $i (y or m)"
ab92d3
             return 1
ab92d3
         fi
ab92d3
     done
ab92d3