From: Antonio Alvarez Feijoo Date: Fri, 10 Sep 2021 11:45:46 +0000 (+0200) Subject: feat(dracut.sh): check if target kernel has zstd support compiled in X-Git-Tag: 056~100 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=591118c56da2bfcea060e3b7671bc87b23c0e44a;p=thirdparty%2Fdracut.git 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. --- diff --git a/dracut.sh b/dracut.sh index 19d21ed97..0f111e80c 100755 --- a/dracut.sh +++ b/dracut.sh @@ -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"