mkinitfs.in: Fix image generation when -n option is given. v1 PROPOSED

Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.alpinelinux.org/~alpine/devel/%3C20171120133711.11696-1-przemoc%40zoho.com%3E/mbox | git am -3
Learn more about email & git

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

Przemyslaw Pawelczyk
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:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
View this thread in the archives