diff --git a/setup/so-setup b/setup/so-setup index c83b7b3ec..207ea3e80 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -137,7 +137,7 @@ fi title "Checking to see if install has run before" if [[ -f /root/accept_changes ]]; then is_reinstall=true - + whiptail_reinstall info "Old setup detected. Moving the last setup.log to setup.log.bak" mv "$setup_log" "$setup_log.bak" [ -f "$error_log" ] && mv "$error_log" "$error_log.bak" @@ -485,11 +485,6 @@ if ! [[ -f $install_opt_file ]]; then info "Setting Paths" # Set the paths set_path - info "Checking if this is a re-install" - # Check to see if its a reinstall. THIS NEEDS REVIEW - if [[ $is_reinstall ]]; then - reinstall_init - fi echo "Disable auto start of setup" # Disable the setup from prompting at login disable_auto_start diff --git a/setup/so-whiptail b/setup/so-whiptail index c7eb350ff..1a5f5f9c8 100755 --- a/setup/so-whiptail +++ b/setup/so-whiptail @@ -1104,6 +1104,15 @@ whiptail_proxy_auth_pass() { whiptail_check_exitstatus $exitstatus } +whiptail_reinstall() { + [ -n "$TESTING" ] && return + + whiptail --title "$whiptail_title" --yesno "Setup has detected a previous install. Do you want to continue? Continuing will overwrite the previos install. " 7 44 + + local exitstatus=$? + whiptail_check_exitstatus $exitstatus +} + whiptail_requirements_error() { local requirement_needed=$1