Merge remote-tracking branch 'remotes/origin/dev' into issue/140

This commit is contained in:
m0duspwnens
2020-05-15 15:21:03 -04:00
14 changed files with 127 additions and 90 deletions

View File

@@ -686,8 +686,7 @@ docker_seed_registry() {
} >> "$setup_log" 2>&1
done
else
cd /nsm/docker-registry/docker
tar xvf /nsm/docker-registry/docker/registry.tar >> "$setup_log" 2>&1
tar xvf /nsm/docker-registry/docker/registry.tar -C /nsm/docker-registry/docker >> "$setup_log" 2>&1
rm /nsm/docker-registry/docker/registry.tar >> "$setup_log" 2>&1
fi

View File

@@ -116,13 +116,7 @@ case "$setup_type" in
whiptail_management_interface_dns_search
fi
# Init networking so rest of install works
set_hostname_iso
set_management_interface
collect_adminuser_inputs
add_admin_user
disable_onion_user
;;
'network')
whiptail_network_notice
@@ -247,6 +241,15 @@ fi
whiptail_make_changes
if [[ "$setup_type" == 'iso' ]]; then
# Init networking so rest of install works
set_hostname_iso
set_management_interface
add_admin_user
disable_onion_user
fi
set_hostname 2>> "$setup_log"
set_version 2>> "$setup_log"
clear_master 2>> "$setup_log"
@@ -316,7 +319,6 @@ export percentage=0
master_pillar 2>> "$setup_log"
fi
set_progress_str 16 'Running first Salt checkin'
salt_firstcheckin 2>> "$setup_log"
@@ -355,7 +357,12 @@ export percentage=0
set_progress_str 25 'Configuring firewall'
set_initial_firewall_policy 2>> "$setup_log"
set_progress_str 26 'Downloading containers from the internet'
if [[ "$setup_type" == 'iso' ]]; then
set_progress_str 26 'Copying containers from iso'
else
set_progress_str 26 'Downloading containers from the internet'
fi
salt-call state.apply -l info registry >> "$setup_log" 2>&1
docker_seed_registry 2>> "$setup_log" # ~ 60% when finished
@@ -461,8 +468,10 @@ export percentage=0
set_progress_str 86 'Updating packages'
update_packages 2>> "$setup_log"
set_progress_str 87 'Adding user to SOC'
add_web_user 2>> "$setup_log"
if [[ $is_master ]]; then
set_progress_str 87 'Adding user to SOC'
add_web_user 2>> "$setup_log"
fi
set_progress_str 90 'Enabling checkin at boot'
checkin_at_boot 2>> "$setup_log"

View File

@@ -429,7 +429,7 @@ whiptail_management_interface_dns() {
[ -n "$TESTING" ] && return
MDNS=$(whiptail --title "Security Onion Setup" --inputbox \
"Enter your DNS server using space between multiple" 10 60 8.8.8.8 8.8.4.4 3>&1 1>&2 2>&3)
"Enter your DNS servers separated by a space" 10 60 8.8.8.8 8.8.4.4 3>&1 1>&2 2>&3)
}
@@ -958,7 +958,7 @@ whiptail_setup_complete() {
[ -n "$TESTING" ] && return
whiptail --title "Security Onion Setup" --msgbox "Finished installing this as an $install_type. Press Enter to reboot." 8 75
whiptail --title "Security Onion Setup" --msgbox "Finished $install_type install. Press ENTER to reboot." 8 75
install_cleanup >> $setup_log 2>&1
}
@@ -967,7 +967,7 @@ whiptail_setup_failed() {
[ -n "$TESTING" ] && return
whiptail --title "Security Onion Setup" --msgbox "Install had a problem. Please see $setup_log for details. Press Enter to reboot." 8 75
whiptail --title "Security Onion Setup" --msgbox "Install had a problem. Please see $setup_log for details. Press ENTER to reboot." 8 75
install_cleanup >> $setup_log 2>&1
}
@@ -1012,9 +1012,9 @@ whiptail_master_updates() {
local update_string
update_string=$(whiptail --title "Security Onion Setup" --radiolist \
"How would you like to download updates for your grid?:" 20 75 4 \
"MASTER" "Master node is proxy for OS/Docker updates." ON \
"OPEN" "Each node connect to the Internet for updates" OFF 3>&1 1>&2 2>&3 )
"How would you like to download OS package updates for your grid?:" 20 75 4 \
"MASTER" "Master node is proxy for updates." ON \
"OPEN" "Each node connects to the Internet for updates" OFF 3>&1 1>&2 2>&3 )
local exitstatus=$?
whiptail_check_exitstatus $exitstatus
@@ -1035,9 +1035,9 @@ whiptail_node_updates() {
[ -n "$TESTING" ] && return
NODEUPDATES=$(whiptail --title "Security Onion Setup" --radiolist \
"How would you like to download updates for this node?:" 20 75 4 \
"MASTER" "Download OS/Docker updates from the Master." ON \
"OPEN" "Download updates directly from the Internet" OFF 3>&1 1>&2 2>&3 )
"How would you like to download OS package updates for your grid?:" 20 75 4 \
"MASTER" "Master node is proxy for updates." ON \
"OPEN" "Each node connects to the Internet for updates" OFF 3>&1 1>&2 2>&3 )
local exitstatus=$?
whiptail_check_exitstatus $exitstatus