Subject: [alpine-devel] [PATCH] mkinitfs.in: Fix image generation when -n option is given.

From: Przemyslaw Pawelczyk <[email-masked]>
Date: Mon, 20 Nov 2017 14:37:11 +0100

Reported-by: Duncan on #alpine-linux

We need to explicitly return success in initfs_kmods and initfs_firmware
for "don't include kernel modules or firmware" case (option -n).
Otherwise script ends prematurely.
---
 mkinitfs.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mkinitfs.in b/mkinitfs.in
index 596ae7b753e4..f3fe1a6daccc 100755
--- a/mkinitfs.in
+++ b/mkinitfs.in
@@ -103,7 +103,7 @@ find_kmods() {
 }
 
 initfs_kmods() {
-	[ -z "$nokernel" ] || return
+	[ -z "$nokernel" ] || return 0
 	local glob= file= files= dirs=
 	rm -rf "$tmpdir"/lib/modules
 	# make sure we have modules.dep
@@ -125,7 +125,7 @@ initfs_kmods() {
 }
 
 initfs_firmware() {
-	[ -z "$nokernel" ] || return
+	[ -z "$nokernel" ] || return 0
 	rm -rf "$tmpdir"/lib/firmware
 	mkdir -p "$tmpdir"/lib/firmware
 	find "$tmpdir"/lib/modules -type f -name "*.ko" | xargs modinfo -F firmware | sort -u | while read FW; do
-- 
2.13.5

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---