From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH] expand-on-first-boot: Fix after failing on every error
Date: Thu, 30 May 2024 20:49:30 +0200 [thread overview]
Message-ID: <f27b7463-3e9a-4022-8c11-9a217753f01b@siemens.com> (raw)
From: Jan Kiszka <jan.kiszka@siemens.com>
As we bail out on every failing command, the test of GPT causes a
premature script end if there is now GPT in the game.
Fixes: 991d2e903930 ("expand-on-first-boot: Preserve MBR on expansion of GPT disks")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
.../expand-on-first-boot/files/expand-last-partition.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh b/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh
index 0cb2ee21..7660bf44 100755
--- a/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh
+++ b/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh
@@ -41,7 +41,7 @@ if [ "$DISK_SIZE" -lt "$MINIMAL_SIZE" ]; then
exit 0
fi
-IS_GPT="$(sfdisk -d "${BOOT_DEV}" 2>/dev/null | grep -q "label: gpt" && echo 1)"
+IS_GPT="$(sfdisk -d "${BOOT_DEV}" 2>/dev/null | grep -q "label: gpt" && echo 1 || true)"
if [ "$IS_GPT" = "1" ]; then
dd if="${BOOT_DEV}" of=/dev/shm/__mbr__.bak count=1
fi
--
2.43.0
next reply other threads:[~2024-05-30 18:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-30 18:49 Jan Kiszka [this message]
2024-05-31 6:48 ` Uladzimir Bely
2024-05-31 7:32 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f27b7463-3e9a-4022-8c11-9a217753f01b@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox