[wip] Test proxy before using it

This commit is contained in:
William Wernert
2021-03-03 15:02:21 -05:00
parent 1ea3cb1c61
commit 3d5cf128ae
3 changed files with 47 additions and 3 deletions

View File

@@ -198,6 +198,14 @@ if ! [[ -f $install_opt_file ]]; then
printf '%s\n' \
"MNIC=$MNIC" \
"HOSTNAME=$HOSTNAME" > "$net_init_file"
if [[ $is_manager ]]; then
collect_proxy
while ! proxy_validate; do
whiptail_invalid_proxy
collect_proxy no_ask
done
[[ -n "$proxy_addr" ]] && set_proxy >> $setup_log 2>&1
fi
whiptail_net_setup_complete
else
whiptail_install_type
@@ -289,6 +297,15 @@ if ! [[ -f $install_opt_file ]]; then
if [[ $reinit_networking ]] || ! [[ -f $net_init_file ]]; then
network_init
fi
if [[ $is_manager ]]; then
collect_proxy
while ! proxy_validate; do
whiptail_invalid_proxy
collect_proxy no_ask
done
[[ -n "$proxy_addr" ]] && set_proxy >> $setup_log 2>&1
fi
if [[ -n "$TURBO" ]]; then
use_turbo_proxy