summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta-google/recipes-phosphor/flash/gbmc-update/40-gbmc-upgrade.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta-google/recipes-phosphor/flash/gbmc-update/40-gbmc-upgrade.sh b/meta-google/recipes-phosphor/flash/gbmc-update/40-gbmc-upgrade.sh
index 0b927f0e36..3ac40208a7 100644
--- a/meta-google/recipes-phosphor/flash/gbmc-update/40-gbmc-upgrade.sh
+++ b/meta-google/recipes-phosphor/flash/gbmc-update/40-gbmc-upgrade.sh
@@ -78,8 +78,14 @@ gbmc_upgrade_hook() {
local tmpdir
tmpdir="$(mktemp -d)" || return
+ if ! gbmc_upgrade_dl_unpack; then
+ echo 'upgrade unpack failed' >&2
+ # shellcheck disable=SC2153
+ rm -rf -- "$tmpdir" "$GBMC_UPGRADE_SIG" "$GBMC_UPGRADE_IMG"
+ return 1
+ fi
# shellcheck disable=SC2015
- gbmc_upgrade_dl_unpack && gbmc_br_run_hooks GBMC_UPGRADE_HOOKS || true
+ gbmc_br_run_hooks GBMC_UPGRADE_HOOKS || true
# shellcheck disable=SC2153
rm -rf -- "$tmpdir" "$GBMC_UPGRADE_SIG" "$GBMC_UPGRADE_IMG"
}