public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] expand-on-first-boot: Fix after failing on every error
@ 2024-05-30 18:49 Jan Kiszka
  2024-05-31  6:48 ` Uladzimir Bely
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2024-05-30 18:49 UTC (permalink / raw)
  To: isar-users

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-31  7:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-30 18:49 [PATCH] expand-on-first-boot: Fix after failing on every error Jan Kiszka
2024-05-31  6:48 ` Uladzimir Bely
2024-05-31  7:32   ` Jan Kiszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox