mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
[fix] Set variables used by sensor pillar before generating the pillar
This commit is contained in:
@@ -854,10 +854,8 @@ configure_network_sensor() {
|
|||||||
echo "Setting up sensor interface" >> "$setup_log" 2>&1
|
echo "Setting up sensor interface" >> "$setup_log" 2>&1
|
||||||
|
|
||||||
if [[ $is_cloud ]]; then
|
if [[ $is_cloud ]]; then
|
||||||
INTERFACE=${BNICS[0]}
|
|
||||||
local nmcli_con_args=( "type" "ethernet" )
|
local nmcli_con_args=( "type" "ethernet" )
|
||||||
else
|
else
|
||||||
INTERFACE='bond0'
|
|
||||||
local nmcli_con_args=( "type" "bond" "mode" "0" )
|
local nmcli_con_args=( "type" "bond" "mode" "0" )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -1307,6 +1305,22 @@ generate_repo_tarball() {
|
|||||||
tar -czf /opt/so/repo/"$SOVERSION".tar.gz ../.
|
tar -czf /opt/so/repo/"$SOVERSION".tar.gz ../.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
generate_sensor_vars() {
|
||||||
|
# Set the MTU
|
||||||
|
if [[ $NSMSETUP != 'ADVANCED' ]]; then
|
||||||
|
if [[ $is_cloud ]]; then MTU=1575; else MTU=1500; fi
|
||||||
|
fi
|
||||||
|
export MTU
|
||||||
|
|
||||||
|
# Set interface variable
|
||||||
|
if [[ $is_cloud ]]; then
|
||||||
|
INTERFACE=${BNICS[0]}
|
||||||
|
else
|
||||||
|
INTERFACE='bond0'
|
||||||
|
fi
|
||||||
|
export INTERFACE
|
||||||
|
}
|
||||||
|
|
||||||
get_redirect() {
|
get_redirect() {
|
||||||
whiptail_set_redirect
|
whiptail_set_redirect
|
||||||
if [ "$REDIRECTINFO" = "OTHER" ]; then
|
if [ "$REDIRECTINFO" = "OTHER" ]; then
|
||||||
@@ -2243,12 +2257,6 @@ sensor_pillar() {
|
|||||||
|
|
||||||
local pillar_file=$temp_install_dir/pillar/minions/$MINION_ID.sls
|
local pillar_file=$temp_install_dir/pillar/minions/$MINION_ID.sls
|
||||||
|
|
||||||
# Set the MTU
|
|
||||||
if [[ $NSMSETUP != 'ADVANCED' ]]; then
|
|
||||||
if [[ $is_cloud ]]; then MTU=1575; else MTU=1500; fi
|
|
||||||
fi
|
|
||||||
export MTU
|
|
||||||
|
|
||||||
# Create the sensor pillar
|
# Create the sensor pillar
|
||||||
printf '%s\n'\
|
printf '%s\n'\
|
||||||
"sensor:"\
|
"sensor:"\
|
||||||
|
|||||||
@@ -575,6 +575,7 @@ set_redirect >> $setup_log 2>&1
|
|||||||
|
|
||||||
if [[ $is_sensor || $is_helix || $is_import ]]; then
|
if [[ $is_sensor || $is_helix || $is_import ]]; then
|
||||||
set_progress_str 3 'Generating sensor pillar'
|
set_progress_str 3 'Generating sensor pillar'
|
||||||
|
generate_sensor_vars
|
||||||
sensor_pillar >> $setup_log 2>&1
|
sensor_pillar >> $setup_log 2>&1
|
||||||
if [[ $is_sensor || $is_helix ]]; then
|
if [[ $is_sensor || $is_helix ]]; then
|
||||||
steno_pillar >> $setup_log
|
steno_pillar >> $setup_log
|
||||||
|
|||||||
Reference in New Issue
Block a user