make sshcmd, scpcmd, ssh_copy_id_cmd global to so-functions;

This commit is contained in:
m0duspwnens
2021-01-05 13:49:51 -05:00
parent c93dfa7b33
commit 0f9bf9deb6
2 changed files with 16 additions and 40 deletions

View File

@@ -108,6 +108,9 @@ if [[ -f automation/$automation && $(basename $automation) == $automation ]]; th
echo "Preselecting variable values based on automated setup: $automation" >> $setup_log 2>&1
source automation/$automation
automated=yes
get_scp_cmd $automated
get_ssh_cmd $automated
get_ssh_copy_id_cmd $automated
attempt=1
attempts=60
@@ -296,7 +299,7 @@ if ! [[ -f $install_opt_file ]]; then
fi
if [[ $is_minion ]]; then
copy_ssh_key $automated >> $setup_log 2>&1
copy_ssh_key >> $setup_log 2>&1
fi
if [[ $is_minion ]] && ! (compare_versions $automated); then
@@ -307,7 +310,7 @@ if ! [[ -f $install_opt_file ]]; then
"HOSTNAME=$HOSTNAME" \
"MSRV=$MSRV" \
"MSRVIP=$MSRVIP" > "$install_opt_file"
download_repo_tarball $automated
download_repo_tarball
exec bash /root/manager_setup/securityonion/setup/so-setup "${original_args[@]}"
fi
@@ -562,7 +565,7 @@ set_redirect >> $setup_log 2>&1
if [[ $is_minion ]]; then
set_progress_str 1 'Configuring firewall'
set_initial_firewall_policy $automated >> $setup_log 2>&1
set_initial_firewall_policy >> $setup_log 2>&1
fi
set_progress_str 2 'Updating packages'
@@ -582,7 +585,7 @@ set_redirect >> $setup_log 2>&1
fi
set_progress_str 5 'Installing Salt and dependencies'
saltify $automated 2>> $setup_log
saltify 2>> $setup_log
set_progress_str 6 'Installing Docker and dependencies'
docker_install >> $setup_log 2>&1
@@ -635,7 +638,7 @@ set_redirect >> $setup_log 2>&1
if [[ $is_minion ]]; then
set_progress_str 20 'Accepting Salt key on manager'
accept_salt_key_remote $automated >> $setup_log 2>&1
accept_salt_key_remote >> $setup_log 2>&1
fi
if [[ $is_manager || $is_import || $is_helix ]]; then
@@ -644,7 +647,7 @@ set_redirect >> $setup_log 2>&1
fi
set_progress_str 21 'Copying minion pillars to manager'
copy_minion_tmp_files $automated >> $setup_log 2>&1
copy_minion_tmp_files >> $setup_log 2>&1
if [[ $is_minion ]]; then
set_progress_str 22 'Checking if the Salt Minion needs to be updated'
@@ -656,7 +659,7 @@ set_redirect >> $setup_log 2>&1
if [[ $is_manager || $is_helix || $is_import ]]; then
set_progress_str 25 'Configuring firewall'
set_initial_firewall_policy $automated >> $setup_log 2>&1
set_initial_firewall_policy >> $setup_log 2>&1
# create these so the registry state can add so-registry to /opt/so/conf/so-status/so-status.conf
mkdir -p /opt/so/conf/so-status/ >> $setup_log 2>&1