From 5a7e31e1bbc683c7483806d1aec31c555f539a8f Mon Sep 17 00:00:00 2001 From: Promofaux Date: Sat, 15 Oct 2016 11:21:01 +0100 Subject: [PATCH] Move update_dialogs so that we are sure whiptail is installed! Thanks @shadiakiki1986 --- automated install/basic-install.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 945fa1e1..dd8a328f 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -884,14 +884,6 @@ update_dialogs(){ } main() { -if [[ -f ${setupVars} ]];then - if [ "$1" == "pihole" ]; then - useUpdateVars=true - else - update_dialogs - fi -fi - # Start the installer # Verify there is enough disk space for the install if [[ $1 = "--i_do_not_follow_recommendations" ]]; then @@ -913,6 +905,15 @@ install_dependent_packages INSTALLER_DEPS[@] # Install packages used by the Pi-hole install_dependent_packages PIHOLE_DEPS[@] +# Is this being called by pihole -up? (pihole argument passed) +if [[ -f ${setupVars} ]];then + if [ "$1" == "pihole" ]; then + useUpdateVars=true # Skip update_dialogs and force update rather than offering choice of update or install. + else + update_dialogs + fi +fi + if [[ ${useUpdateVars} == false ]]; then # Display welcome dialogs welcomeDialogs