Browse Source

feat(dracut.sh): check if target kernel has zstd support compiled in

If compression option is zstd, check if target kernel supports it.
Otherwise, do not compress the initramfs image.
master
Antonio Alvarez Feijoo 3 years ago committed by Jóhann B. Guðmundsson
parent
commit
591118c56d
  1. 5
      dracut.sh

5
dracut.sh

@ -2381,6 +2381,11 @@ case $compress in @@ -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"

Loading…
Cancel
Save