mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Add logging for cloud detection and interface settings
This commit is contained in:
@@ -803,8 +803,10 @@ configure_network_sensor() {
|
|||||||
info "Setting up sensor interface"
|
info "Setting up sensor interface"
|
||||||
|
|
||||||
if [[ $is_cloud ]]; then
|
if [[ $is_cloud ]]; then
|
||||||
|
info "Configuring traditional interface settings, since this is a cloud installation..."
|
||||||
local nmcli_con_args=( "type" "ethernet" )
|
local nmcli_con_args=( "type" "ethernet" )
|
||||||
else
|
else
|
||||||
|
info "Configuring bond interface settings, since this is a not a cloud installation..."
|
||||||
local nmcli_con_args=( "type" "bond" "mode" "0" )
|
local nmcli_con_args=( "type" "bond" "mode" "0" )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -909,7 +911,7 @@ create_repo() {
|
|||||||
|
|
||||||
detect_cloud() {
|
detect_cloud() {
|
||||||
info "Testing if setup is running on a cloud instance..."
|
info "Testing if setup is running on a cloud instance..."
|
||||||
if ( curl --fail -s -m 5 http://169.254.169.254/latest/meta-data/instance-id > /dev/null ) || ( dmidecode -s bios-vendor | grep -q Google > /dev/null) || [ -f /var/log/waagent.log ]; then export is_cloud="true"; fi
|
if ( curl --fail -s -m 5 http://169.254.169.254/latest/meta-data/instance-id > /dev/null ) || ( dmidecode -s bios-vendor | grep -q Google > /dev/null) || [ -f /var/log/waagent.log ]; then info "Detected a cloud installation..." && export is_cloud="true"; fi
|
||||||
}
|
}
|
||||||
|
|
||||||
detect_os() {
|
detect_os() {
|
||||||
@@ -1252,6 +1254,7 @@ generate_interface_vars() {
|
|||||||
else
|
else
|
||||||
INTERFACE='bond0'
|
INTERFACE='bond0'
|
||||||
fi
|
fi
|
||||||
|
info "Interface set to $INTERFACE"
|
||||||
export INTERFACE
|
export INTERFACE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user