commit:     d94f83a2bec20a65c3f06b78fff301802d55df95
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 18 00:32:47 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Jul 18 00:32:47 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=d94f83a2

gen_initramfs.sh: create_initramfs(): Output reason when initramfs compression 
is skipped

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 gen_initramfs.sh | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index 1479a5d..8419a20 100755
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -1713,15 +1713,12 @@ create_initramfs() {
                                lz4) compress_ext='.lz4' 
compress_cmd="${cmd_lz4} -f -9 -l -q" ;;
                        esac
 
-                       if [ -n "${compression}" ]
-                       then
-                               print_info 1 "$(get_indent 1)>> Compressing 
cpio data (${compress_ext}) ..."
-                               print_info 3 "COMMAND: ${compress_cmd} $CPIO" 1 
0 1
-                               ${compress_cmd} "${CPIO}" || gen_die 
"Compression (${compress_cmd}) failed"
-                               mv -f "${CPIO}${compress_ext}" "${CPIO}" || 
gen_die "Rename failed"
-                       else
-                               print_info 1 "$(get_indent 1)>> Not compressing 
cpio data ..."
-                       fi
+                       print_info 1 "$(get_indent 1)>> Compressing cpio data 
(${compress_ext}) ..."
+                       print_info 3 "COMMAND: ${compress_cmd} $CPIO" 1 0 1
+                       ${compress_cmd} "${CPIO}" || gen_die "Compression 
(${compress_cmd}) failed"
+                       mv -f "${CPIO}${compress_ext}" "${CPIO}" || gen_die 
"Rename failed"
+               else
+                       print_info 3 "$(get_indent 1)>> --no-compress-initramfs 
is set; Skipping compression of initramfs ..."
                fi
 
                ## To early load microcode we need to follow some pretty 
specific steps

Reply via email to