X-Original-To: alpine-devel@lists.alpinelinux.org Received: from sender-pp-092.zoho.com (sender-pp-092.zoho.com [135.84.80.237]) by lists.alpinelinux.org (Postfix) with ESMTP id CC0935C4DED for ; Mon, 20 Nov 2017 13:37:21 +0000 (GMT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=from:to:cc:subject:date:message-id; b=q//ASG77x6/HpJYnCt4CCPorQPjBplj1SeFvk8OnGGjXTkRR5ga9vx8pWYevhRA4TLXlOHrbWNBZ x0L+C/lWfpmYJ+xzJH3TTYMWAwA7Ym6cKl9u4s48TANikGV/0BH/ Received: from localhost (89-76-36-159.dynamic.chello.pl [89.76.36.159]) by mx.zohomail.com with SMTPS id 1511185039404881.4365888966031; Mon, 20 Nov 2017 05:37:19 -0800 (PST) From: Przemyslaw Pawelczyk To: ncopa@alpinelinux.org Cc: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] [PATCH] mkinitfs.in: Fix image generation when -n option is given. Date: Mon, 20 Nov 2017 14:37:11 +0100 Message-Id: <20171120133711.11696-1-przemoc@zoho.com> X-Mailer: git-send-email 2.13.5 X-ZohoMailClient: External X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: 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 ---