mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #6909 from Security-Onion-Solutions/fix/preflight-curl
Install curl in preflight script to avoid error on Ubuntu
This commit is contained in:
@@ -1156,7 +1156,9 @@ installer_prereq_packages() {
|
||||
systemctl start NetworkManager
|
||||
} >> "$setup_log" 2<&1
|
||||
fi
|
||||
retry 50 10 "apt-get -y install curl" >> "$setup_log" 2>&1 || exit 1
|
||||
if ! command -v curl > /dev/null 2>&1; then
|
||||
retry 50 10 "apt-get -y install curl" >> "$setup_log" 2>&1 || exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -168,6 +168,14 @@ __check_url_arr() {
|
||||
return $ret_code
|
||||
}
|
||||
|
||||
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 || exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
local intro_str="Beginning pre-flight checks."
|
||||
local success_str="Pre-flight checks completed successfully!"
|
||||
@@ -183,6 +191,7 @@ main() {
|
||||
echo "$intro_str" | tee "$preflight_log"
|
||||
fi
|
||||
check_default_repos &&\
|
||||
preflight_prereqs &&\
|
||||
check_new_repos &&\
|
||||
check_misc_urls
|
||||
|
||||
|
||||
Reference in New Issue
Block a user