diff --git a/setup/so-functions b/setup/so-functions index d4a97db9f..736f2e15b 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -169,13 +169,6 @@ calculate_useable_cores() { export lb_procs } -catch() { - info "Fatal error occurred at $1 in so-setup, failing setup." - grep --color=never "ERROR" "$setup_log" > "$error_log" - whiptail_setup_failed - exit 1 -} - check_admin_pass() { check_pass_match "$ADMINPASS1" "$ADMINPASS2" "APMATCH" } diff --git a/setup/so-setup b/setup/so-setup index ca3403bee..5f4329750 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -135,7 +135,12 @@ fi # Set up handler for setup to exit early (use `kill -SIGUSR1 "$setup_proc"; exit 1` in child scripts) trap 'catch $LINENO' SIGUSR1 setup_proc="$$" -catch +catch() { + info "Fatal error occurred at $1 in so-setup, failing setup." + grep --color=never "ERROR" "$setup_log" > "$error_log" + whiptail_setup_failed + exit 1 +} automated=no progress