Skip to content

Commit

Permalink
feat(dracut.sh): check if target kernel has zstd support compiled in
Browse files Browse the repository at this point in the history
If compression option is zstd, check if target kernel supports it.
Otherwise, do not compress the initramfs image.
  • Loading branch information
aafeijoo-suse committed Sep 10, 2021
1 parent 6f5f44e commit f9c7dea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dracut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2381,6 +2381,11 @@ case $compress in
;;
esac
if [[ $compress == $DRACUT_COMPRESS_ZSTD* ]] && ! check_kernel_config CONFIG_RD_ZSTD; then
dwarn "dracut: kernel has no zstd support compiled in."
compress="cat"
fi
if ! (
umask 077
cd "$initdir"
Expand Down

0 comments on commit f9c7dea

Please sign in to comment.