retry up to 25 minutes if APT is locked by an unattended upgrade. This is an increase from 8 minutes.

This commit is contained in:
Jason Ertel
2022-10-13 06:57:17 -04:00
parent 078213ddb3
commit 1c23d91a3b
2 changed files with 8 additions and 8 deletions

View File

@@ -56,7 +56,7 @@ check_default_repos() {
printf '%s' 'apt update.' | tee -a "$preflight_log"
fi
echo "" >> "$preflight_log"
retry 50 10 "apt-get -y update" >> $preflight_log 2>&1
retry 150 10 "apt-get -y update" >> $preflight_log 2>&1
ret_code=$?
[[ $ret_code == 0 ]] && printf '%s\n' ' SUCCESS' || printf '%s\n' ' FAILURE'
@@ -161,7 +161,7 @@ preflight_prereqs() {
if [[ $OS == 'centos' ]]; then
: # no-op to match structure of other checks for $OS var
else
retry 50 10 "apt-get -y install curl" >> "$preflight_log" 2>&1 || ret_code=1
retry 150 10 "apt-get -y install curl" >> "$preflight_log" 2>&1 || ret_code=1
fi
return $ret_code