mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 09:42:46 +01:00
[fix] Add check for TESTHOST being blank, only install packages before setup if missing
This commit is contained in:
@@ -467,7 +467,10 @@ detect_os() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Install bind-utils so the host command exists
|
# Install bind-utils so the host command exists
|
||||||
yum -y install bind-utils >> "$setup_log" 2>&1
|
if ! command -v host > /dev/null 2>&1; then
|
||||||
|
echo "Installing required packages to run installer"
|
||||||
|
yum -y install bind-utils >> "$setup_log" 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
elif [ -f /etc/os-release ]; then
|
elif [ -f /etc/os-release ]; then
|
||||||
@@ -481,11 +484,14 @@ detect_os() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# Install network manager so we can do interface stuff
|
# Install network manager so we can do interface stuff
|
||||||
{
|
if ! command -v nmcli > /dev/null 2>&1; then
|
||||||
apt-get install -y network-manager;
|
echo "Installing required packages to run installer"
|
||||||
systemctl enable NetworkManager;
|
{
|
||||||
systemctl start NetworkManager;
|
apt-get install -y network-manager;
|
||||||
} >> "$setup_log" 2<&1
|
systemctl enable NetworkManager;
|
||||||
|
systemctl start NetworkManager;
|
||||||
|
} >> "$setup_log" 2<&1
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "We were unable to determine if you are using a supported OS."
|
echo "We were unable to determine if you are using a supported OS."
|
||||||
|
|||||||
@@ -515,7 +515,7 @@ whiptail_management_server() {
|
|||||||
# See if it resolves. Otherwise prompt to add to host file
|
# See if it resolves. Otherwise prompt to add to host file
|
||||||
TESTHOST=$(host "$MSRV")
|
TESTHOST=$(host "$MSRV")
|
||||||
|
|
||||||
if [[ $TESTHOST = *"not found"* ]] || [ -z "$TESTHOST" ] || [[ $TESTHOST = *"connection timed out"* ]]; then
|
if [[ $TESTHOST = *"not found"* ]] || [ -z "$TESTHOST" ] || [[ $TESTHOST = *"connection timed out"* ]] || [[ "$TESTHOST" = '' ]]; then
|
||||||
add_master_hostfile
|
add_master_hostfile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user