mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 17:52:46 +01:00
distributed testing
This commit is contained in:
@@ -2303,6 +2303,9 @@ set_initial_firewall_access() {
|
|||||||
if [[ ! -z "$ALLOW_CIDR" ]]; then
|
if [[ ! -z "$ALLOW_CIDR" ]]; then
|
||||||
$default_salt_dir/salt/common/tools/sbin/so-firewall --role=analyst --ip=$ALLOW_CIDR --apply=true
|
$default_salt_dir/salt/common/tools/sbin/so-firewall --role=analyst --ip=$ALLOW_CIDR --apply=true
|
||||||
fi
|
fi
|
||||||
|
if [[ ! -z "$MINION_CIDR" ]]; then
|
||||||
|
$default_salt_dir/salt/common/tools/sbin/so-firewall --role=sensors --ip=$MINION_CIDR --apply=true
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set up the management interface on the ISO
|
# Set up the management interface on the ISO
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ if [ -n "$test_profile" ]; then
|
|||||||
HOSTNAME=sensor
|
HOSTNAME=sensor
|
||||||
MSRVIP_OFFSET=-2
|
MSRVIP_OFFSET=-2
|
||||||
elif [[ "$test_profile" =~ "-search" ]]; then
|
elif [[ "$test_profile" =~ "-search" ]]; then
|
||||||
install_type=SEARCH
|
install_type=SEARCHNODE
|
||||||
HOSTNAME=search
|
HOSTNAME=search
|
||||||
MSRVIP_OFFSET=-1
|
MSRVIP_OFFSET=-1
|
||||||
else
|
else
|
||||||
@@ -198,6 +198,7 @@ if [ -n "$test_profile" ]; then
|
|||||||
|
|
||||||
info "Activating test profile; profile=$test_profile; install_type=$install_type"
|
info "Activating test profile; profile=$test_profile; install_type=$install_type"
|
||||||
|
|
||||||
|
MINION_CIDR=10.0.0.0/8
|
||||||
MSRV=manager
|
MSRV=manager
|
||||||
if [[ "$test_profile" =~ "-net" ]]; then
|
if [[ "$test_profile" =~ "-net" ]]; then
|
||||||
address_type=DHCP
|
address_type=DHCP
|
||||||
@@ -473,7 +474,7 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
add_mngr_ip_to_hosts
|
add_mngr_ip_to_hosts
|
||||||
check_manager_connection
|
check_manager_connection
|
||||||
collect_idh_services
|
collect_idh_services
|
||||||
collect_idh_preferences
|
collect_idh_preferences
|
||||||
set_minion_info
|
set_minion_info
|
||||||
whiptail_end_settings
|
whiptail_end_settings
|
||||||
|
|
||||||
|
|||||||
@@ -79,6 +79,19 @@ status_failed() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
create_temp_so_status_if_missing() {
|
||||||
|
if ! which so-status &> /dev/null; then
|
||||||
|
if [ -f /root/success ]; then
|
||||||
|
echo "echo 'Minion installation succeeded - so-status not yet available'" > /usr/sbin/so-status
|
||||||
|
echo "exit 0" >> /usr/sbin/so-status
|
||||||
|
else
|
||||||
|
echo "echo 'Installation failed - so-status not available'" > /usr/sbin/so-status
|
||||||
|
echo "exit 100" >> /usr/sbin/so-status
|
||||||
|
fi
|
||||||
|
chmod a+x /usr/sbin/so-status
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
exit_code=0
|
exit_code=0
|
||||||
if [ -f /root/success ]; then
|
if [ -f /root/success ]; then
|
||||||
@@ -103,6 +116,8 @@ main() {
|
|||||||
touch /root/success
|
touch /root/success
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
create_temp_so_status_if_missing
|
||||||
|
|
||||||
exit $exit_code
|
exit $exit_code
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user