mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 17:52:46 +01:00
[feat] Init network + soremote key early
This commit is contained in:
@@ -205,13 +205,11 @@ fi
|
||||
|
||||
# Check if this is an airgap install
|
||||
|
||||
if [[ $is_manager ]]; then
|
||||
if [[ $is_iso ]]; then
|
||||
whiptail_airgap
|
||||
if [[ "$INTERWEBS" == 'AIRGAP' ]]; then
|
||||
is_airgap=true
|
||||
fi
|
||||
fi
|
||||
if [[ $is_manager && $is_iso ]]; then
|
||||
whiptail_airgap
|
||||
if [[ "$INTERWEBS" == 'AIRGAP' ]]; then
|
||||
is_airgap=true
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $is_manager && $is_sensor ]]; then
|
||||
@@ -226,10 +224,6 @@ elif [[ $is_import ]]; then
|
||||
check_requirements "import"
|
||||
fi
|
||||
|
||||
if [[ ! $is_import ]]; then
|
||||
whiptail_patch_schedule
|
||||
fi
|
||||
|
||||
case "$setup_type" in
|
||||
'iso')
|
||||
whiptail_set_hostname
|
||||
@@ -243,8 +237,6 @@ case "$setup_type" in
|
||||
whiptail_management_interface_dns
|
||||
whiptail_management_interface_dns_search
|
||||
fi
|
||||
|
||||
#collect_adminuser_inputs
|
||||
;;
|
||||
'network')
|
||||
whiptail_network_notice
|
||||
@@ -254,6 +246,22 @@ case "$setup_type" in
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ $is_minion ]]; then
|
||||
whiptail_management_server
|
||||
fi
|
||||
|
||||
whiptail_management_interface_setup
|
||||
|
||||
if [[ "$setup_type" == 'iso' ]]; then
|
||||
# Init networking so rest of install works
|
||||
set_hostname
|
||||
set_management_interface
|
||||
fi
|
||||
|
||||
if [[ $is_minion || $is_import ]]; then
|
||||
[ "$automated" == no ] && copy_ssh_key >> $setup_log 2>&1
|
||||
fi
|
||||
|
||||
short_name=$(echo "$HOSTNAME" | awk -F. '{print $1}')
|
||||
|
||||
MINION_ID=$(echo "${short_name}_${install_type}" | tr '[:upper:]' '[:lower:]')
|
||||
@@ -320,6 +328,10 @@ if [[ $is_helix || $is_sensor || $is_import ]]; then
|
||||
calculate_useable_cores
|
||||
fi
|
||||
|
||||
if [[ ! $is_import ]]; then
|
||||
whiptail_patch_schedule
|
||||
fi
|
||||
|
||||
whiptail_homenet_manager
|
||||
whiptail_dockernet_check
|
||||
|
||||
@@ -365,10 +377,6 @@ if [[ $is_distmanager || ( $is_sensor || $is_node || $is_fleet_standalone ) && !
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $is_minion ]]; then
|
||||
whiptail_management_server
|
||||
fi
|
||||
|
||||
if [[ $is_distmanager ]]; then
|
||||
collect_soremote_inputs
|
||||
fi
|
||||
@@ -436,11 +444,6 @@ if [[ -n "$TURBO" ]]; then
|
||||
use_turbo_proxy
|
||||
fi
|
||||
|
||||
if [[ "$setup_type" == 'iso' ]]; then
|
||||
set_hostname >> $setup_log 2>&1
|
||||
set_management_interface
|
||||
fi
|
||||
|
||||
disable_ipv6
|
||||
|
||||
if [[ "$setup_type" != 'iso' ]]; then
|
||||
@@ -495,7 +498,6 @@ fi
|
||||
|
||||
if [[ $is_minion || $is_import ]]; then
|
||||
set_updates >> $setup_log 2>&1
|
||||
[ "$automated" == no ] && copy_ssh_key >> $setup_log 2>&1
|
||||
fi
|
||||
|
||||
if [[ $is_manager && $is_airgap ]]; then
|
||||
|
||||
@@ -765,6 +765,22 @@ whiptail_management_nic() {
|
||||
|
||||
}
|
||||
|
||||
whiptail_management_interface_setup() {
|
||||
[ -n "$TESTING" ] && return
|
||||
|
||||
local minion_msg
|
||||
|
||||
if [[ $is_minion || $is_import ]]; then
|
||||
minion_msg=" and copy the ssh key for soremote to the manager"
|
||||
else
|
||||
minion_msg=""
|
||||
fi
|
||||
|
||||
whiptail --title "Security Onion Setup" --yesno "Setup will now initialize networking$minion_msg. Select YES to continue or NO to cancel." 8 75
|
||||
local exitstatus=$?
|
||||
whiptail_check_exitstatus $exitstatus
|
||||
}
|
||||
|
||||
whiptail_nids() {
|
||||
|
||||
[ -n "$TESTING" ] && return
|
||||
|
||||
Reference in New Issue
Block a user