Skip to content

Commit

Permalink
resin-init-flasher: replace fatal with fail
Browse files Browse the repository at this point in the history
The fatal() function is only defined while running in the initramfs
while fail() is provided by the OS helper logging which is available
in both the OS and flasher image.

Change-type: patch
Signed-off-by: Alex Gonzalez <alexg@balena.io>
  • Loading branch information
alexgg committed May 3, 2024
1 parent 43dc6e6 commit 53e995b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ fi

if [ "$LUKS" = "1" ]; then
if type diskenc_setup >/dev/null 2>&1 && ! diskenc_setup; then
fatal "Failed to setup disk encryption"
fail "Failed to setup disk encryption"
fi

# Attach the image to a loop device
Expand Down Expand Up @@ -385,7 +385,7 @@ fi

if [ "$LUKS" = "1" ]; then
if type bootpart_split >/dev/null 2>&1 && ! bootpart_split; then
fatal "Failed to split boot partition."
fail "Failed to split boot partition."
fi
fi

Expand Down Expand Up @@ -443,7 +443,7 @@ if [ -f "${EXTERNAL_DEVICE_BOOT_PART_MOUNTPOINT}/${BALENA_BOOTLOADER_CONFIG}" ];
fi

if type secureboot_bootloader_setup >/dev/null 2>&1 && ! secureboot_bootloader_setup; then
fatal "Failed to run secureboot post installation steps."
fail "Failed to run secureboot post installation steps."
fi

# Copy json configuration file from external (flasher) to the internal
Expand All @@ -469,7 +469,7 @@ umount $INTERNAL_DEVICE_BOOT_PART_MOUNTPOINT
sync

if type secureboot_bootloader_postsetup >/dev/null 2>&1 && ! secureboot_bootloader_postsetup; then
fatal "Failed to run secureboot post installation steps."
fail "Failed to run secureboot post installation steps."
fi

if [ "$LUKS" = "1" ]; then
Expand Down

0 comments on commit 53e995b

Please sign in to comment.