From 16f8d87dcd6d172d4be4b29fd7525a77cfc31e87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramon=20Buld=C3=B3?= Date: Sun, 4 Oct 2015 01:57:33 +0200 Subject: [PATCH] Only use lz4 compression in kernels 4.0 or newer --- lib/util-iso.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 84e62f6..2524f32 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -139,7 +139,8 @@ squash_image_dir() { local highcomp="-b 256K -Xbcj x86" [[ "${iso_compression}" != "xz" ]] && highcomp="" msg2 "Creating SquashFS image. This may take some time..." - if [[ "$(basename "$1")" == "mhwd-image" ]]; then + local used_kernel=$(echo ${kernel} | cut -c 6) + if [[ "$(basename "$1")" == "mhwd-image" && ${used_kernel} -ge "4"]]; then mksquashfs "${1}" "${sq_img}" -noappend -comp lz4 || die "Exit ..." else mksquashfs "${1}" "${sq_img}" -noappend -comp ${iso_compression} ${highcomp} || die "Exit ..."