mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +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=$?
|
||||
whiptail_check_exitstatus $exitstatus
|
||||
|
||||
# See if it resolves. Otherwise prompt to add to host file
|
||||
TESTHOST=$(host "$MSRV")
|
||||
|
||||
if [[ $TESTHOST = *"not found"* ]] || [ -z "$TESTHOST" ] || [[ $TESTHOST = *"connection timed out"* ]] || [[ "$TESTHOST" = '' ]]; then
|
||||
if ! getent hosts "$MSRV"; then
|
||||
add_master_hostfile
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user