From 9fcba64ffe136f3e6da0583796803660276858af Mon Sep 17 00:00:00 2001 From: Thierry Laurion Date: Sun, 1 Sep 2024 18:44:52 -0400 Subject: [PATCH] flash.sh: replace die calls by recovery calls where relevant otherwise returning to caller without being useful Signed-off-by: Thierry Laurion --- initrd/bin/flash.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/initrd/bin/flash.sh b/initrd/bin/flash.sh index b3e1d664..7c5a853d 100755 --- a/initrd/bin/flash.sh +++ b/initrd/bin/flash.sh @@ -26,13 +26,13 @@ flash_rom() { ROM=$1 if [ "$READ" -eq 1 ]; then $CONFIG_FLASH_OPTIONS -r "${ROM}" \ - || die "Backup to $ROM failed" + || recovery "Backup to $ROM failed" else cp "$ROM" /tmp/${CONFIG_BOARD}.rom sha256sum /tmp/${CONFIG_BOARD}.rom if [ "$CLEAN" -eq 0 ]; then preserve_rom /tmp/${CONFIG_BOARD}.rom \ - || die "$ROM: Config preservation failed" + || recovery "$ROM: Config preservation failed" fi # persist serial number from CBFS if cbfs.sh -r serial_number > /tmp/serial 2>/dev/null; then @@ -86,7 +86,7 @@ if [ "$READ" -eq 0 ] && [ "${ROM##*.}" = tgz ]; then echo "Reading current flash and building an update image" $CONFIG_FLASH_OPTIONS -r /tmp/flash.sh.bak \ - || die "Read of flash has failed" + || recovery "Read of flash has failed" # ROM and bootblock already have ECC bootblock=$(echo /tmp/verified_rom/*.bootblock)