From: Martin Wilck Date: Fri, 19 Nov 2021 11:39:30 +0000 (+0100) Subject: fix(dracut.sh): drop pointless check for module compression method X-Git-Tag: 056~61 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=586d3e7664c00bf144becfa69dde2dbab8711d51;p=thirdparty%2Fdracut.git fix(dracut.sh): drop pointless check for module compression method 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. --- diff --git a/dracut.sh b/dracut.sh index 867febe12..62934bb95 100755 --- 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