mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 01:32:47 +01:00
[wip][fix] Don't add logic to so-setup, create wrapper function in so-functions
This commit is contained in:
@@ -536,6 +536,18 @@ collect_patch_schedule_name_import() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
collect_proxy() {
|
collect_proxy() {
|
||||||
|
collect_proxy_details
|
||||||
|
while ! proxy_validate; do
|
||||||
|
if whiptail_invalid_proxy; then
|
||||||
|
collect_proxy_details no_ask
|
||||||
|
else
|
||||||
|
so_proxy=""
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
collect_proxy_details() {
|
||||||
local ask=${1:-true}
|
local ask=${1:-true}
|
||||||
local use_proxy
|
local use_proxy
|
||||||
if [[ $ask != true ]]; then
|
if [[ $ask != true ]]; then
|
||||||
|
|||||||
@@ -200,11 +200,7 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
"HOSTNAME=$HOSTNAME" > "$net_init_file"
|
"HOSTNAME=$HOSTNAME" > "$net_init_file"
|
||||||
if [[ $is_manager ]]; then
|
if [[ $is_manager ]]; then
|
||||||
collect_proxy
|
collect_proxy
|
||||||
while ! proxy_validate; do
|
[[ -n "$so_proxy" ]] && set_proxy >> $setup_log 2>&1
|
||||||
whiptail_invalid_proxy
|
|
||||||
collect_proxy no_ask
|
|
||||||
done
|
|
||||||
[[ -n "$proxy_addr" ]] && set_proxy >> $setup_log 2>&1
|
|
||||||
fi
|
fi
|
||||||
whiptail_net_setup_complete
|
whiptail_net_setup_complete
|
||||||
else
|
else
|
||||||
@@ -300,14 +296,6 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
|
|
||||||
if [[ $is_manager ]]; then
|
if [[ $is_manager ]]; then
|
||||||
collect_proxy
|
collect_proxy
|
||||||
while ! proxy_validate; do
|
|
||||||
if whiptail_invalid_proxy; then
|
|
||||||
collect_proxy no_ask
|
|
||||||
else
|
|
||||||
proxy_addr=""
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$TURBO" ]]; then
|
if [[ -n "$TURBO" ]]; then
|
||||||
@@ -559,7 +547,7 @@ catch() {
|
|||||||
|
|
||||||
# Set REDIRECTIT variable, which is used by a function outside the below subshell
|
# Set REDIRECTIT variable, which is used by a function outside the below subshell
|
||||||
set_redirect >> $setup_log 2>&1
|
set_redirect >> $setup_log 2>&1
|
||||||
[[ -n "$proxy_addr" ]] && set_proxy >> $setup_log 2>&1
|
[[ -n "$so_proxy" ]] && set_proxy >> $setup_log 2>&1
|
||||||
|
|
||||||
|
|
||||||
# Begin install
|
# Begin install
|
||||||
|
|||||||
Reference in New Issue
Block a user