mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-09 18:52:52 +01:00
Fix setup whiptail for airgap
This commit is contained in:
@@ -335,45 +335,53 @@ process_installtype
|
|||||||
|
|
||||||
# If this is not an automated install prompt
|
# If this is not an automated install prompt
|
||||||
if ! [[ -f $install_opt_file ]]; then
|
if ! [[ -f $install_opt_file ]]; then
|
||||||
|
# If you are a manager ask ALL the manager things here. I know there is code re-use but this makes it easier to add new roles
|
||||||
# If you are a manager ask ALL the manager things here. I know there is code re-use but this makes it easier to add new roles.
|
|
||||||
if [[ $is_eval ]]; then
|
if [[ $is_eval ]]; then
|
||||||
|
# waitforstate means we will run the full salt state at the end. This is for only nodes running the salt-master service
|
||||||
waitforstate=true
|
waitforstate=true
|
||||||
#ubuntu_check
|
# Does this role have monitoring interfaces?
|
||||||
monints=true
|
monints=true
|
||||||
|
# Prompt the user to accept the elastic license
|
||||||
check_elastic_license
|
check_elastic_license
|
||||||
|
# If it is an install from ISO is this airgap?
|
||||||
|
[[ $is_iso ]] && whiptail_airgap
|
||||||
|
# Make sure minimum requirements are met
|
||||||
check_requirements "manager"
|
check_requirements "manager"
|
||||||
|
# Do networking things
|
||||||
networking_needful
|
networking_needful
|
||||||
collect_net_method
|
# Do we need a proxy?
|
||||||
|
[[ ! $is_airgap ]] && collect_net_method
|
||||||
|
# Do we need to change the dockernet subnet?
|
||||||
collect_dockernet
|
collect_dockernet
|
||||||
if [[ $is_iso ]]; then
|
# Are we in the clouds?
|
||||||
whiptail_airgap
|
[[ ! $is_airgap ]] && detect_cloud
|
||||||
fi
|
# Sets some minion info
|
||||||
detect_cloud
|
|
||||||
set_minion_info
|
set_minion_info
|
||||||
set_default_log_size >> $setup_log 2>&1
|
set_default_log_size >> $setup_log 2>&1
|
||||||
info "Verifying all network devices are managed by Network Manager that should be"
|
info "Verifying all network devices are managed by Network Manager that should be"
|
||||||
check_network_manager_conf
|
check_network_manager_conf
|
||||||
set_network_dev_status_list
|
set_network_dev_status_list
|
||||||
|
# What NIC for watching network traffic?
|
||||||
whiptail_sensor_nics
|
whiptail_sensor_nics
|
||||||
|
# How many cores do we have?
|
||||||
calculate_useable_cores
|
calculate_useable_cores
|
||||||
|
# What is the web user?
|
||||||
collect_webuser_inputs
|
collect_webuser_inputs
|
||||||
|
# How are we accessing the UI?
|
||||||
get_redirect
|
get_redirect
|
||||||
|
# Does the user want to allow access to the UI?
|
||||||
collect_so_allow
|
collect_so_allow
|
||||||
whiptail_end_settings
|
whiptail_end_settings
|
||||||
elif [[ $is_standalone ]]; then
|
elif [[ $is_standalone ]]; then
|
||||||
waitforstate=true
|
waitforstate=true
|
||||||
#ubuntu_check
|
|
||||||
monints=true
|
monints=true
|
||||||
check_elastic_license
|
check_elastic_license
|
||||||
|
[[ $is_iso ]] && whiptail_airgap
|
||||||
check_requirements "manager"
|
check_requirements "manager"
|
||||||
networking_needful
|
networking_needful
|
||||||
collect_net_method
|
[[ ! $is_airgap ]] && collect_net_method
|
||||||
collect_dockernet
|
collect_dockernet
|
||||||
if [[ $is_iso ]]; then
|
[[ ! $is_airgap ]] && detect_cloud
|
||||||
whiptail_airgap
|
|
||||||
fi
|
|
||||||
detect_cloud
|
|
||||||
set_minion_info
|
set_minion_info
|
||||||
set_default_log_size >> $setup_log 2>&1
|
set_default_log_size >> $setup_log 2>&1
|
||||||
info "Verifying all network devices are managed by Network Manager that should be"
|
info "Verifying all network devices are managed by Network Manager that should be"
|
||||||
@@ -389,14 +397,12 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
check_elastic_license
|
check_elastic_license
|
||||||
waitforstate=true
|
waitforstate=true
|
||||||
#ubuntu_check
|
#ubuntu_check
|
||||||
|
[[ $is_iso ]] && whiptail_airgap
|
||||||
check_requirements "manager"
|
check_requirements "manager"
|
||||||
networking_needful
|
networking_needful
|
||||||
collect_net_method
|
[[ ! $is_airgap ]] && collect_net_method
|
||||||
collect_dockernet
|
collect_dockernet
|
||||||
if [[ $is_iso ]]; then
|
[[ ! $is_airgap ]] && detect_cloud
|
||||||
whiptail_airgap
|
|
||||||
fi
|
|
||||||
detect_cloud
|
|
||||||
set_minion_info
|
set_minion_info
|
||||||
set_default_log_size >> $setup_log 2>&1
|
set_default_log_size >> $setup_log 2>&1
|
||||||
info "Verifying all network devices are managed by Network Manager that should be"
|
info "Verifying all network devices are managed by Network Manager that should be"
|
||||||
@@ -410,15 +416,12 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
elif [[ $is_managersearch ]]; then
|
elif [[ $is_managersearch ]]; then
|
||||||
check_elastic_license
|
check_elastic_license
|
||||||
waitforstate=true
|
waitforstate=true
|
||||||
#ubuntu_check
|
[[ $is_iso ]] && whiptail_airgap
|
||||||
check_requirements "manager"
|
check_requirements "manager"
|
||||||
networking_needful
|
networking_needful
|
||||||
collect_net_method
|
[[ ! $is_airgap ]] && collect_net_method
|
||||||
collect_dockernet
|
collect_dockernet
|
||||||
if [[ $is_iso ]]; then
|
[[ ! $is_airgap ]] && detect_cloud
|
||||||
whiptail_airgap
|
|
||||||
fi
|
|
||||||
detect_cloud
|
|
||||||
set_minion_info
|
set_minion_info
|
||||||
set_default_log_size >> $setup_log 2>&1
|
set_default_log_size >> $setup_log 2>&1
|
||||||
info "Verifying all network devices are managed by Network Manager that should be"
|
info "Verifying all network devices are managed by Network Manager that should be"
|
||||||
@@ -430,7 +433,6 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
collect_so_allow
|
collect_so_allow
|
||||||
whiptail_end_settings
|
whiptail_end_settings
|
||||||
elif [[ $is_sensor ]]; then
|
elif [[ $is_sensor ]]; then
|
||||||
#ubuntu_check
|
|
||||||
installer_prereq_packages
|
installer_prereq_packages
|
||||||
monints=true
|
monints=true
|
||||||
check_requirements "sensor"
|
check_requirements "sensor"
|
||||||
@@ -459,7 +461,6 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
whiptail_end_settings
|
whiptail_end_settings
|
||||||
|
|
||||||
elif [[ $is_searchnode ]]; then
|
elif [[ $is_searchnode ]]; then
|
||||||
#ubuntu_check
|
|
||||||
installer_prereq_packages
|
installer_prereq_packages
|
||||||
check_requirements "elasticsearch"
|
check_requirements "elasticsearch"
|
||||||
networking_needful
|
networking_needful
|
||||||
@@ -473,7 +474,6 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
whiptail_end_settings
|
whiptail_end_settings
|
||||||
|
|
||||||
elif [[ $is_heavynode ]]; then
|
elif [[ $is_heavynode ]]; then
|
||||||
#ubuntu_check
|
|
||||||
installer_prereq_packages
|
installer_prereq_packages
|
||||||
monints=true
|
monints=true
|
||||||
check_requirements "heavynode"
|
check_requirements "heavynode"
|
||||||
@@ -486,29 +486,26 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
whiptail_end_settings
|
whiptail_end_settings
|
||||||
|
|
||||||
elif [[ $is_idh ]]; then
|
elif [[ $is_idh ]]; then
|
||||||
#ubuntu_check
|
|
||||||
installer_prereq_packages
|
installer_prereq_packages
|
||||||
check_requirements "idh"
|
check_requirements "idh"
|
||||||
networking_needful
|
networking_needful
|
||||||
collect_mngr_hostname
|
collect_mngr_hostname
|
||||||
add_mngr_ip_to_hosts
|
add_mngr_ip_to_hosts
|
||||||
check_manager_connection
|
check_manager_connection
|
||||||
#collect_idh_services (this may be added back sometime in the future)
|
|
||||||
collect_idh_preferences
|
collect_idh_preferences
|
||||||
set_minion_info
|
set_minion_info
|
||||||
whiptail_end_settings
|
whiptail_end_settings
|
||||||
|
|
||||||
elif [[ $is_import ]]; then
|
elif [[ $is_import ]]; then
|
||||||
#ubuntu_check
|
|
||||||
waitforstate=true
|
waitforstate=true
|
||||||
monints=true
|
monints=true
|
||||||
|
[[ $is_iso ]] && whiptail_airgap
|
||||||
check_elastic_license
|
check_elastic_license
|
||||||
check_requirements "import"
|
check_requirements "import"
|
||||||
networking_needful
|
networking_needful
|
||||||
if [[ $is_iso ]]; then
|
[[ ! $is_airgap ]] && detect_cloud
|
||||||
whiptail_airgap
|
collect_dockernet
|
||||||
fi
|
[[ ! $is_airgap ]] && collect_net_method
|
||||||
detect_cloud
|
|
||||||
set_minion_info
|
set_minion_info
|
||||||
set_default_log_size >> $setup_log 2>&1
|
set_default_log_size >> $setup_log 2>&1
|
||||||
info "Verifying all network devices are managed by Network Manager that should be"
|
info "Verifying all network devices are managed by Network Manager that should be"
|
||||||
@@ -521,7 +518,6 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
whiptail_end_settings
|
whiptail_end_settings
|
||||||
|
|
||||||
elif [[ $is_receiver ]]; then
|
elif [[ $is_receiver ]]; then
|
||||||
#ubuntu_check
|
|
||||||
installer_prereq_packages
|
installer_prereq_packages
|
||||||
check_requirements "receiver"
|
check_requirements "receiver"
|
||||||
networking_needful
|
networking_needful
|
||||||
|
|||||||
Reference in New Issue
Block a user