Show airgap prompt within if statement + persist variable for node installs

This commit is contained in:
William Wernert
2021-04-20 11:34:17 -04:00
parent b449955711
commit bbf16d0f11

View File

@@ -260,6 +260,11 @@ elif [ "$install_type" = 'ANALYST' ]; then
is_analyst=true
fi
if [[ $is_manager || $is_import ]]; then
check_elastic_license
fi
if ! [[ -f $install_opt_file ]]; then
# Check if this is an airgap install
if [[ ( $is_manager || $is_import || $is_minion ) && $is_iso ]]; then
whiptail_airgap
@@ -268,11 +273,6 @@ if [[ ( $is_manager || $is_import || $is_minion ) && $is_iso ]]; then
fi
fi
if [[ $is_manager || $is_import ]]; then
check_elastic_license
fi
if ! [[ -f $install_opt_file ]]; then
if [[ $is_manager && $is_sensor ]]; then
check_requirements "standalone"
elif [[ $is_fleet_standalone ]]; then
@@ -326,8 +326,6 @@ if ! [[ -f $install_opt_file ]]; then
copy_ssh_key >> $setup_log 2>&1
fi
if [[ $is_minion ]] && ! (compare_versions); then
info "Installer version mismatch, downloading correct version from manager"
printf '%s\n' \
@@ -336,6 +334,7 @@ if ! [[ -f $install_opt_file ]]; then
"HOSTNAME=$HOSTNAME" \
"MSRV=$MSRV" \
"MSRVIP=$MSRVIP" \
"is_airgap=$is_airgap" \
"NODE_DESCRIPTION=\"$NODE_DESCRIPTION\"" > "$install_opt_file"
[[ -n $so_proxy ]] && echo "so_proxy=$so_proxy" >> "$install_opt_file"
download_repo_tarball