mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-01-02 22:33:17 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user