Merge branch 'bugfix/whiptail-percent' into dev

This commit is contained in:
William Wernert
2020-05-19 10:22:27 -04:00
2 changed files with 10 additions and 10 deletions

View File

@@ -1065,7 +1065,7 @@ saltify() {
openssl\ openssl\
jq; jq;
yum -y update exclude=salt*; yum -y update exclude=salt*;
systemctl enable salt-minion systemctl enable salt-minion;
} >> "$setup_log" 2>&1 } >> "$setup_log" 2>&1
echo "exclude=salt*" >> /etc/yum.conf echo "exclude=salt*" >> /etc/yum.conf
else else
@@ -1212,12 +1212,10 @@ setup_salt_master_dirs() {
} }
set_progress_str() { set_progress_str() {
local percentage_input local percentage_input=$1
percentage_input=$1 local progress_bar_text=$2
local progress_bar_text
progress_bar_text=$2
if [ "$percentage_input" -gt "$percentage" ]; then if (( "$percentage_input" >= "$percentage" )); then
percentage="$percentage_input" percentage="$percentage_input"
fi fi
@@ -1225,7 +1223,10 @@ set_progress_str() {
echo -e "$percentage_str" echo -e "$percentage_str"
printf '%s\n' '----' "${progress_bar_text^^}" "----" >> "$setup_log" 2>&1 printf '%s\n' \
'----'\
"$percentage% - ${progress_bar_text^^}"\
"----" >> "$setup_log" 2>&1
sleep 5 sleep 5
} }

View File

@@ -272,10 +272,9 @@ if [[ $is_minion ]]; then
fi fi
# Begin install # Begin install
{
# Set initial percentage to 0 # Set initial percentage to 0
export percentage=0 export percentage=0
{
if [[ $is_sensor || $is_helix ]]; then if [[ $is_sensor || $is_helix ]]; then
set_progress_str 1 'Creating bond interface' set_progress_str 1 'Creating bond interface'