mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-12 20:22:59 +01:00
[fix] Double quote variables + fix indents
This commit is contained in:
@@ -17,8 +17,8 @@
|
||||
|
||||
# Source the other pieces of the setup
|
||||
SCRIPTDIR=$(dirname "$0")
|
||||
source $SCRIPTDIR/so-functions
|
||||
source $SCRIPTDIR/so-whiptail
|
||||
source "$SCRIPTDIR/so-functions"
|
||||
source "$SCRIPTDIR/so-whiptail"
|
||||
|
||||
# See if this is an ISO install
|
||||
OPTIONS=$1
|
||||
@@ -44,16 +44,16 @@ SETUPLOG="/root/sosetup.log"
|
||||
# End Global Variables
|
||||
|
||||
# Reset the Install Log
|
||||
date -u >$SETUPLOG 2>&1
|
||||
date -u > $SETUPLOG 2>&1
|
||||
echo "stty size is: $(stty size)" >> $SETUPLOG 2>&1
|
||||
|
||||
# Check for prerequisites
|
||||
got_root
|
||||
detect_os
|
||||
|
||||
if [ $OS == ubuntu ]; then
|
||||
if [ "$OS" == ubuntu ]; then
|
||||
# Override the horrible Ubuntu whiptail color pallete
|
||||
update-alternatives --set newt-palette /etc/newt/palette.original
|
||||
update-alternatives --set newt-palette /etc/newt/palette.original >> $SETUPLOG 2>&1
|
||||
fi
|
||||
|
||||
# Question Time
|
||||
@@ -61,7 +61,7 @@ echo "Asking user if they are sure they want to proceed" >> $SETUPLOG 2>&1
|
||||
if (whiptail_you_sure) ; then
|
||||
|
||||
# Create a temp dir to get started
|
||||
install_prep
|
||||
install_prep >> $SETUPLOG 2>&1
|
||||
setterm -blank 0
|
||||
|
||||
if [ $INSTALLMETHOD == network ]; then
|
||||
@@ -84,7 +84,7 @@ if (whiptail_you_sure) ; then
|
||||
whiptail_dhcp_or_static
|
||||
|
||||
# Do this if it static is selected
|
||||
if [ $ADDRESSTYPE != 'DHCP' ]; then
|
||||
if [ "$ADDRESSTYPE" != 'DHCP' ]; then
|
||||
whiptail_management_interface_ip
|
||||
whiptail_management_interface_mask
|
||||
whiptail_management_interface_gateway
|
||||
@@ -114,8 +114,8 @@ if (whiptail_you_sure) ; then
|
||||
|
||||
# What kind of install are we doing?
|
||||
whiptail_install_type
|
||||
SHORTNAME=$(echo $HOSTNAME | awk -F. {'print $1'})
|
||||
MINION_ID=$(echo $SHORTNAME'_'$INSTALLTYPE | tr '[:upper:]' '[:lower:]')
|
||||
SHORTNAME=$(echo "$HOSTNAME" | awk -F. '{print $1}')
|
||||
MINION_ID=$(echo "$SHORTNAME'_'$INSTALLTYPE" | tr '[:upper:]' '[:lower:]')
|
||||
echo "MINION_ID = $MINION_ID" >> $SETUPLOG 2>&1
|
||||
|
||||
# How do we want to handle OS patching? manual, auto or scheduled days and hours
|
||||
@@ -130,10 +130,10 @@ if (whiptail_you_sure) ; then
|
||||
'Import Schedule')
|
||||
whiptail_patch_schedule_import
|
||||
;;
|
||||
Automatic)
|
||||
'Automatic')
|
||||
PATCHSCHEDULENAME=auto
|
||||
;;
|
||||
Manual)
|
||||
'Manual')
|
||||
PATCHSCHEDULENAME=manual
|
||||
;;
|
||||
esac
|
||||
@@ -141,21 +141,23 @@ if (whiptail_you_sure) ; then
|
||||
####################
|
||||
## Helix ##
|
||||
####################
|
||||
if [ $INSTALLTYPE == 'HELIXSENSOR' ]; then
|
||||
if [ $"INSTALLTYPE" == 'HELIXSENSOR' ]; then
|
||||
MASTERUPDATES=OPEN
|
||||
filter_unused_nics
|
||||
[[ $SKIP_BOND != 'yes' ]] && whiptail_bond_nics
|
||||
[[ "$SKIP_BOND" != 'yes' ]] && whiptail_bond_nics
|
||||
whiptail_helix_apikey
|
||||
whiptail_homenet_master
|
||||
RULESETUP=ETOPEN
|
||||
NSMSETUP=BASIC
|
||||
HNSENSOR=inherit
|
||||
LS_HEAP_SIZE="1000m"
|
||||
calculate_useable_cores
|
||||
calculate_useable_cores >> "$SETUPLOG" 2>&1
|
||||
whiptail_make_changes
|
||||
set_hostname
|
||||
set_version
|
||||
clear_master
|
||||
{
|
||||
set_hostname;
|
||||
set_version;
|
||||
clear_master;
|
||||
} >> "$SETUPLOG" 2>&1
|
||||
mkdir -p /nsm
|
||||
get_filesystem_root
|
||||
get_filesystem_nsm
|
||||
@@ -276,7 +278,7 @@ if (whiptail_you_sure) ; then
|
||||
####################
|
||||
## Master ##
|
||||
####################
|
||||
if [ $INSTALLTYPE == 'MASTER' ]; then
|
||||
if [ "$INSTALLTYPE" == 'MASTER' ]; then
|
||||
|
||||
# Would you like to do an advanced install?
|
||||
whiptail_master_adv
|
||||
@@ -294,7 +296,7 @@ if (whiptail_you_sure) ; then
|
||||
whiptail_rule_setup
|
||||
|
||||
# Get the code if it isn't ET Open
|
||||
if [ $RULESETUP != 'ETOPEN' ]; then
|
||||
if [ "$RULESETUP" != 'ETOPEN' ]; then
|
||||
# Get the code
|
||||
whiptail_oinkcode
|
||||
fi
|
||||
@@ -305,9 +307,9 @@ if (whiptail_you_sure) ; then
|
||||
process_components
|
||||
|
||||
# Do Advacned Setup if they chose it
|
||||
if [ $MASTERADV == 'ADVANCED' ]; then
|
||||
if [ "$MASTERADV" == 'ADVANCED' ]; then
|
||||
# Ask which bro logs to enable - Need to add Suricata check
|
||||
if [ $BROVERSION != 'SURICATA' ]; then
|
||||
if [ "$BROVERSION" != 'SURICATA' ]; then
|
||||
whiptail_master_adv_service_brologs
|
||||
fi
|
||||
fi
|
||||
@@ -315,7 +317,7 @@ if (whiptail_you_sure) ; then
|
||||
# Get a password for the soremote user
|
||||
whiptail_create_soremote_user
|
||||
SCMATCH=no
|
||||
while [ $SCMATCH != yes ]; do
|
||||
while [ "$SCMATCH" != 'yes' ]; do
|
||||
whiptail_create_soremote_user_password1
|
||||
whiptail_create_soremote_user_password2
|
||||
check_soremote_pass
|
||||
|
||||
Reference in New Issue
Block a user