Skip to content

Commit

Permalink
fix(dracut.sh): drop pointless check for module compression method
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mwilck authored and johannbg committed Nov 26, 2021
1 parent 7938935 commit 586d3e7
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions dracut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 586d3e7

Please sign in to comment.