diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index 1a33a7895..76addeb13 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -121,10 +121,13 @@ check_sudoers() { } check_log_size_limit() { + local wait_for_enter=false + local num_minion_pillars num_minion_pillars=$(find /opt/so/saltstack/local/pillar/minions/ -type f | wc -l) if [[ $num_minion_pillars -gt 1 ]]; then + wait_for_enter=true echo "[INFO] The value of log_size_limit in the minion pillars may be incorrect." echo " -> We recommend checking and adjusting the values as necessary." else @@ -166,9 +169,16 @@ check_log_size_limit() { new_limit=$( echo "$disk_size_gb" "$percent" | awk '{printf("%.0f", $1 * ($2/100))}') if [[ $current_limit != "$new_limit" ]]; then + wait_for_enter=true echo "[WARNING] The value of log_size_limit (${current_limit}) does not match the recommended value of ${new_limit}." echo " -> We recommend checking and adjusting the value as necessary." fi + + if [[ $wait_for_enter == true ]]; then + echo "" + read -n 1 -s -r -p "Press any key to continue..." + echo "" # Since read doesn't print a newline, print one for it + fi fi } @@ -392,6 +402,7 @@ up_2.3.2X_to_2.3.30() { for pillar in "${minion_pillars[@]}"; do sed -i -r "s/ (\{\{.*}})$/ '\1'/g" "$pillar" done + check_log_size_limit } space_check() { @@ -714,7 +725,7 @@ fi check_sudoers -check_log_size_limit + }