Move update_dialogs so that we are sure whiptail is installed! Thanks @shadiakiki1986

This commit is contained in:
Promofaux 2016-10-15 11:21:01 +01:00
parent 23f7363c70
commit 5a7e31e1bb

View file

@ -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