28ab1c
From 4a0aa64ecdcaf47e17e27c59e6ea4efc19359c00 Mon Sep 17 00:00:00 2001
28ab1c
From: Lukas Nykryn <lnykryn@redhat.com>
28ab1c
Date: Fri, 23 Jul 2021 16:24:51 +0200
28ab1c
Subject: [PATCH] fix: revise squash module checks
28ab1c
28ab1c
Based on 16efdfa25c65c31acc97d91b7baf4f7bb4ea8510
28ab1c
---
28ab1c
 modules.d/99squash/module-setup.sh | 12 ++----------
28ab1c
 1 file changed, 2 insertions(+), 10 deletions(-)
28ab1c
28ab1c
diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh
28ab1c
index 0acf7c3a..dd4f3ecf 100644
28ab1c
--- a/modules.d/99squash/module-setup.sh
28ab1c
+++ b/modules.d/99squash/module-setup.sh
28ab1c
@@ -1,19 +1,11 @@
28ab1c
 #!/bin/bash
28ab1c
 
28ab1c
 check() {
28ab1c
-    if ! dracut_module_included "systemd-initrd"; then
28ab1c
-        derror "dracut-squash only supports systemd bases initramfs"
28ab1c
-        return 1
28ab1c
-    fi
28ab1c
-
28ab1c
-    if ! find_binary mksquashfs >/dev/null || ! find_binary unsquashfs >/dev/null ; then
28ab1c
-        derror "dracut-squash module requires squashfs-tools"
28ab1c
-        return 1
28ab1c
-    fi
28ab1c
+    require_binaries mksquashfs unsquashfs || return 1
28ab1c
 
28ab1c
     for i in CONFIG_SQUASHFS CONFIG_BLK_DEV_LOOP CONFIG_OVERLAY_FS ; do
28ab1c
         if ! check_kernel_config $i; then
28ab1c
-            derror "dracut-squash module requires kernel configuration $i (y or m)"
28ab1c
+            dinfo "dracut-squash module requires kernel configuration $i (y or m)"
28ab1c
             return 1
28ab1c
         fi
28ab1c
     done
28ab1c