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