diff options
Diffstat (limited to 'meta-google')
-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 |