diff options
author | Yuxiao Zhang <yuxiaozhang@google.com> | 2024-05-14 23:39:01 +0300 |
---|---|---|
committer | Yuxiao Zhang <yuxiaozhang@google.com> | 2024-05-15 00:31:01 +0300 |
commit | e758ab0afd33826684188b9141a15aa9ce1716ee (patch) | |
tree | 239268dcc22c24eebf32b37d8c8667ae3ac0010a | |
parent | ecb9886523248ce726b2a452d12a48234d126fc5 (diff) | |
download | openbmc-e758ab0afd33826684188b9141a15aa9ce1716ee.tar.xz |
meta-google: gbmc-update: stop self-upgrade if url is missing
This change will stop self update if the url is empty. Let it fall
through the upgrade hook and return error.
Change-Id: I92118d1697f1b8474c5152e6ea52f7ddb36b5615
Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
-rw-r--r-- | meta-google/recipes-phosphor/flash/gbmc-update/40-gbmc-upgrade.sh | 7 |
1 files changed, 5 insertions, 2 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 3ac40208a7..d671e81f16 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 @@ -28,6 +28,11 @@ else fi gbmc_upgrade_dl_unpack() { + if [ -z "${bootfile_url-}" ]; then + echo "bootfile_url is empty" >&2 + return 1 + fi + echo "Fetching $bootfile_url" >&2 # We only support tarballs at the moment, our URLs will always denote @@ -74,8 +79,6 @@ gbmc_upgrade_dl_unpack() { } gbmc_upgrade_hook() { - [ -n "${bootfile_url-}" ] || return 0 - local tmpdir tmpdir="$(mktemp -d)" || return if ! gbmc_upgrade_dl_unpack; then |