]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(dracut.sh): drop pointless check for module compression method
authorMartin Wilck <mwilck@suse.com>
Fri, 19 Nov 2021 11:39:30 +0000 (12:39 +0100)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Fri, 26 Nov 2021 17:01:45 +0000 (17:01 +0000)
There's no need to decompress the kernel modules in dracut, and
"$kcompress" is never referenced. dracut can build the initramfs
just fine if there's no tool for decompressing modules.

dracut.sh

index 867febe12bb760cd8f42e9d5d593aafcda64ee1e..62934bb955f889e26f02170b15a21bf82754a296 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -1294,23 +1294,6 @@ if [[ $no_kernel != yes ]] && [[ -d $srcmods ]]; then
         else
             dwarn "$srcmods/modules.dep is missing. Did you run depmod?"
         fi
-    elif ! (command -v gzip &> /dev/null && command -v xz &> /dev/null); then
-        read -r _mod < "$srcmods"/modules.dep
-        _mod=${_mod%%:*}
-        if [[ -f $srcmods/"$_mod" ]]; then
-            # Check, if kernel modules are compressed, and if we can uncompress them
-            case "$_mod" in
-                *.ko.gz) kcompress=gzip ;;
-                *.ko.xz) kcompress=xz ;;
-                *.ko.zst) kcompress=zstd ;;
-            esac
-            if [[ $kcompress ]]; then
-                if ! command -v "$kcompress" &> /dev/null; then
-                    dfatal "Kernel modules are compressed with $kcompress, but $kcompress is not available."
-                    exit 1
-                fi
-            fi
-        fi
     fi
 fi