Fix reinstall logic

This commit is contained in:
Mike Reeves
2023-01-11 12:15:21 -05:00
parent 0531d369aa
commit 6d1e6fc358
2 changed files with 10 additions and 6 deletions

View File

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

View File

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