mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 02:02:50 +01:00
Check for Ubuntu
This commit is contained in:
@@ -2303,6 +2303,17 @@ so_add_user() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ubuntu_check() {
|
||||||
|
if [[ $OS == "ubuntu" ]]; then
|
||||||
|
if [[ $waitforstate ]]; then
|
||||||
|
whiptail_ubuntu_notsupported
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
whiptail_ubuntu_warning
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
update_sudoers_for_testing() {
|
update_sudoers_for_testing() {
|
||||||
if [ -n "$TESTING" ]; then
|
if [ -n "$TESTING" ]; then
|
||||||
info "Ensuring $INSTALLUSERNAME has password-less sudo access for automated testing purposes."
|
info "Ensuring $INSTALLUSERNAME has password-less sudo access for automated testing purposes."
|
||||||
|
|||||||
@@ -314,6 +314,7 @@ 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=true
|
waitforstate=true
|
||||||
|
ubuntu_check
|
||||||
monints=true
|
monints=true
|
||||||
check_elastic_license
|
check_elastic_license
|
||||||
check_requirements "manager"
|
check_requirements "manager"
|
||||||
@@ -336,6 +337,7 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
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
|
||||||
check_requirements "manager"
|
check_requirements "manager"
|
||||||
@@ -359,6 +361,7 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
elif [[ $is_manager ]]; then
|
elif [[ $is_manager ]]; then
|
||||||
check_elastic_license
|
check_elastic_license
|
||||||
waitforstate=true
|
waitforstate=true
|
||||||
|
ubuntu_check
|
||||||
check_requirements "manager"
|
check_requirements "manager"
|
||||||
networking_needful
|
networking_needful
|
||||||
collect_dockernet
|
collect_dockernet
|
||||||
@@ -378,6 +381,7 @@ 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
|
||||||
check_requirements "manager"
|
check_requirements "manager"
|
||||||
networking_needful
|
networking_needful
|
||||||
collect_dockernet
|
collect_dockernet
|
||||||
@@ -395,6 +399,7 @@ 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
|
||||||
monints=true
|
monints=true
|
||||||
check_requirements "sensor"
|
check_requirements "sensor"
|
||||||
calculate_useable_cores
|
calculate_useable_cores
|
||||||
@@ -410,6 +415,7 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
whiptail_end_settings
|
whiptail_end_settings
|
||||||
|
|
||||||
elif [[ $is_searchnode ]]; then
|
elif [[ $is_searchnode ]]; then
|
||||||
|
ubuntu_check
|
||||||
check_requirements "elasticsearch"
|
check_requirements "elasticsearch"
|
||||||
networking_needful
|
networking_needful
|
||||||
check_network_manager_conf
|
check_network_manager_conf
|
||||||
@@ -422,6 +428,7 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
whiptail_end_settings
|
whiptail_end_settings
|
||||||
|
|
||||||
elif [[ $is_heavynode ]]; then
|
elif [[ $is_heavynode ]]; then
|
||||||
|
ubuntu_check
|
||||||
monints=true
|
monints=true
|
||||||
check_requirements "heavynode"
|
check_requirements "heavynode"
|
||||||
calculate_useable_cores
|
calculate_useable_cores
|
||||||
@@ -432,6 +439,7 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
whiptail_end_settings
|
whiptail_end_settings
|
||||||
|
|
||||||
elif [[ $is_idh ]]; then
|
elif [[ $is_idh ]]; then
|
||||||
|
ubuntu_check
|
||||||
check_requirements "idh"
|
check_requirements "idh"
|
||||||
networking_needful
|
networking_needful
|
||||||
collect_mngr_hostname
|
collect_mngr_hostname
|
||||||
@@ -440,6 +448,7 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
whiptail_end_settings
|
whiptail_end_settings
|
||||||
|
|
||||||
elif [[ $is_import ]]; then
|
elif [[ $is_import ]]; then
|
||||||
|
ubuntu_check
|
||||||
waitforstate=true
|
waitforstate=true
|
||||||
monints=true
|
monints=true
|
||||||
check_elastic_license
|
check_elastic_license
|
||||||
@@ -461,6 +470,7 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
whiptail_end_settings
|
whiptail_end_settings
|
||||||
|
|
||||||
elif [[ $is_receiver ]]; then
|
elif [[ $is_receiver ]]; then
|
||||||
|
ubuntu_check
|
||||||
check_requirements "receiver"
|
check_requirements "receiver"
|
||||||
networking_needful
|
networking_needful
|
||||||
collect_mngr_hostname
|
collect_mngr_hostname
|
||||||
|
|||||||
@@ -1327,6 +1327,28 @@ whiptail_storage_requirements() {
|
|||||||
whiptail_check_exitstatus $exitstatus
|
whiptail_check_exitstatus $exitstatus
|
||||||
}
|
}
|
||||||
|
|
||||||
|
whiptail_ubuntu_notsupported() {
|
||||||
|
[ -n "$TESTING" ] && return
|
||||||
|
|
||||||
|
read -r -d '' message <<- EOM
|
||||||
|
Ubuntu is not supported for this node type.
|
||||||
|
|
||||||
|
Please use a supported OS or install via ISO.
|
||||||
|
EOM
|
||||||
|
whiptail --title "$whiptail_title" --msgbox "$message" 14 75
|
||||||
|
}
|
||||||
|
|
||||||
|
whiptail_ubuntu_warning() {
|
||||||
|
[ -n "$TESTING" ] && return
|
||||||
|
|
||||||
|
read -r -d '' message <<- EOM
|
||||||
|
Ubuntu support for this node type is limited.
|
||||||
|
|
||||||
|
Please consider using a fully supported OS or install via ISO.
|
||||||
|
EOM
|
||||||
|
whiptail --title "$whiptail_title" --msgbox "$message" 14 75
|
||||||
|
|
||||||
|
}
|
||||||
whiptail_uppercase_warning() {
|
whiptail_uppercase_warning() {
|
||||||
|
|
||||||
[ -n "$TESTING" ] && return
|
[ -n "$TESTING" ] && return
|
||||||
|
|||||||
Reference in New Issue
Block a user