diff options
author | William A. Kennington III <wak@google.com> | 2022-03-23 21:23:06 +0300 |
---|---|---|
committer | William A. Kennington III <wak@google.com> | 2022-04-02 01:34:42 +0300 |
commit | 499f724bd7372e9ff563bf852ea4b5018d08def0 (patch) | |
tree | cd7aaedbb0cf9764cb90c39e407e138cbff3b13c | |
parent | 0bc32377ada62d70441fd5f7b6a2628b9f559303 (diff) | |
download | openbmc-499f724bd7372e9ff563bf852ea4b5018d08def0.tar.xz |
meta-google: gbmc-update: Retry wget in case networking isn't ready
Otherwise the netboot process will fail early and never complete
properly.
Change-Id: I90dfbaa53d914df1f9515e2a1feaf17797f741b8
Signed-off-by: William A. Kennington III <wak@google.com>
-rw-r--r-- | meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh b/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh index fb6bb4d1af..4c7d15e4a8 100644 --- a/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh +++ b/meta-google/recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh @@ -41,7 +41,15 @@ gbmc_upgrade_fetch() ( # Ensure some sane output file limit # Currently no BMC image is larger than 64M ulimit -H -f $((96 * 1024 * 1024)) || return - wget -q -O - "$bootfile_url" | tar -xC "$tmpdir" || true + timeout=$((SECONDS + 120)) + while (( SECONDS < timeout )); do + local st=(0) + wget -q -O - "$bootfile_url" | tar -xC "$tmpdir" || st=("${PIPESTATUS[@]}") + (( st[0] != 0 )) || break + shopt -s nullglob + rm -rf -- "${tmpdir:?}"/* "${tmpdir:?}"/.* + sleep 5 + done local sig sig="$(find "$tmpdir" -name 'image-*.sig')" || return |