don't require resolveip if it won't be used

This commit is contained in:
Brian White 2024-05-21 08:15:28 -04:00 committed by Sergei Golubchik
parent 82ba486e54
commit a960e95feb

View File

@ -38,6 +38,7 @@ force=0
in_rpm=0
ip_only=0
cross_bootstrap=0
do_resolve=0
auth_root_authentication_method=socket
auth_root_socket_user=""
skip_test_db=0
@ -330,6 +331,11 @@ parse_arguments PICK-ARGS-FROM-ARGV "$@"
rel_mysqld="$dirname0/@INSTALL_SBINDIR@/mariadbd"
if test "$cross_bootstrap" -eq 0 -a "$in_rpm" -eq 0 -a "$force" -eq 0
do_resolve=1
then
fi
# Configure paths to support files
if test -n "$srcdir"
then
@ -422,7 +428,7 @@ fi
hostname=`@HOSTNAME@`
# Check if hostname is valid
if test "$cross_bootstrap" -eq 0 -a "$in_rpm" -eq 0 -a "$force" -eq 0
if test "$do_resolve" -eq 1
then
resolved=`"$resolveip" $hostname 2>&1`
if test $? -ne 0
@ -448,7 +454,7 @@ then
fi
fi
if test "$ip_only" -eq 1
if test "$do_resolve" -eq 1 -a "$ip_only" -eq 1
then
hostname=`echo "$resolved" | awk '/ /{print $6}'`
fi