From 61611b8de288b429f25ef0bad986d0d9f88d8435 Mon Sep 17 00:00:00 2001 From: William Wernert Date: Tue, 2 Mar 2021 10:23:04 -0500 Subject: [PATCH] Fix Elasticsearch disk space prompt Resolves #3205 --- setup/so-whiptail | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/setup/so-whiptail b/setup/so-whiptail index 390cd70a5..0d976558c 100755 --- a/setup/so-whiptail +++ b/setup/so-whiptail @@ -631,11 +631,23 @@ whiptail_invalid_hostname() { whiptail_log_size_limit() { [ -n "$TESTING" ] && return - - log_size_limit=$(whiptail --title "Security Onion Setup" --inputbox \ - "Please specify the amount of disk space (in GB) you would like to allocate for Elasticsearch data storage: \n\ - By default, this is set to 80% of the disk space allotted for /nsm." 10 75 "$log_size_limit" 3>&1 1>&2 2>&3) + case $install_type in + STANDALONE | EVAL | HEAVYNODE) + percentage=50 + ;; + *) + percentage=80 + ;; + esac + + read -r -d '' message <<- EOM + Please specify the amount of disk space (in GB) you would like to allocate for Elasticsearch data storage. + + By default, this is set to ${percentage}% of the disk space allotted for /nsm. + EOM + + log_size_limit=$(whiptail --title "Security Onion Setup" --inputbox "$message" 11 75 "$1" 3>&1 1>&2 2>&3) local exitstatus=$? whiptail_check_exitstatus $exitstatus