mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
[feat] Use getent instead of hosts in case the hostsfile has already been updated
This commit is contained in:
@@ -519,10 +519,7 @@ whiptail_management_server() {
|
|||||||
local exitstatus=$?
|
local exitstatus=$?
|
||||||
whiptail_check_exitstatus $exitstatus
|
whiptail_check_exitstatus $exitstatus
|
||||||
|
|
||||||
# See if it resolves. Otherwise prompt to add to host file
|
if ! getent hosts "$MSRV"; then
|
||||||
TESTHOST=$(host "$MSRV")
|
|
||||||
|
|
||||||
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