diff --git a/setup/so-functions b/setup/so-functions index 4103f0988..76e579765 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -1404,7 +1404,7 @@ reinstall_init() { local pid=$! local count=0 - while check_service_status "$service"; do + while ! (check_service_status "$service"); do if [[ $count -gt $service_retry_count ]]; then echo "Could not stop $service after 1 minute, exiting setup." diff --git a/setup/so-setup b/setup/so-setup index 79ba916a9..924bdf307 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -485,14 +485,12 @@ fi # Exit parent script if -trap 'catch $? $LINENO' SIGUSR1 +trap 'catch $LINENO' SIGUSR1 catch() { - if [ "$1" != 0 ]; then - info "Fatal error occurred at $2 in so-setup, failing setup." - whiptail_setup_failed - exit - fi + info "Fatal error occurred at $2 in so-setup, failing setup." + whiptail_setup_failed + exit } # Begin install