From 499f724bd7372e9ff563bf852ea4b5018d08def0 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Wed, 23 Mar 2022 11:23:06 -0700 Subject: 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 --- .../recipes-phosphor/flash/gbmc-update/75-gbmc-upgrade.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'meta-google') 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 -- cgit v1.2.3