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

Przemyslaw Pawelczyk
Details
Message ID
<20171120133711.11696-1-przemoc@zoho.com>
Sender timestamp
1511185031
DKIM signature
missing
Download raw message
Patch: +2 -2
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
---