From a960e95febd10b8558e9e626869babd0573bbf69 Mon Sep 17 00:00:00 2001 From: Brian White Date: Tue, 21 May 2024 08:15:28 -0400 Subject: [PATCH] don't require resolveip if it won't be used --- scripts/mysql_install_db.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index f38c1d7f98b..e2b2109373a 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -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