commit:     a76b67b8013df36b4cc5b33d9c3e56dc3fab49db
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 14 09:50:29 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Jul 14 11:58:17 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=a76b67b8
gen_initramfs.sh: Refactor append_overlay()

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

 gen_initramfs.sh | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index c4e9bdb..56c84c7 100755
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -713,11 +713,12 @@ append_splash(){
        fi
 }
 
-append_overlay(){
-       cd ${INITRAMFS_OVERLAY}
+append_overlay() {
+       cd "${INITRAMFS_OVERLAY}"  || gen_die "Failed to chdir to 
'${INITRAMFS_OVERLAY}'!"
+
        log_future_cpio_content
        find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \
-                       || gen_die "compressing overlay cpio"
+               || gen_die "Failed to append overlay to cpio!"
 }
 
 append_luks() {

Reply via email to