Setup Script - Change function for calculating cores

This commit is contained in:
Mike Reeves
2018-04-09 21:33:30 -04:00
parent 442bb8f256
commit f840c0bf15

View File

@@ -26,9 +26,9 @@ LISTCORES=$(cat /proc/cpuinfo | grep processor | awk '{print $3 " \"" "core" "\"
# Functions
bro_calculate_lbprocs() {
calculate_useable_cores() {
#Calculate total lbprocs for basic install
local CORES4BRO=$(( $CPUCORES/2 ))
local CORES4BRO=$(( $CPUCORES/2 - 1 ))
LBPROCS=$(printf "%.0f\n" $CORES4BRO)
}
@@ -649,6 +649,8 @@ if (whiptail_you_sure) then
whiptail_management_server
whiptail_nids
whiptail_sensor_config
# Calculate bro lbprocs so we can call it in the prompts
calculate_useable_cores
if [ $NSMSETUP == 'ADVANCED' ]; then
whiptail_bro_pins
whiptail_bond_nics_mtu