From 1e7453e53937896441793764db58bbaaed9bf6ee Mon Sep 17 00:00:00 2001 From: cxhong Date: Wed, 4 Mar 2020 16:02:34 -0500 Subject: [PATCH] change to symbol links instead force options --- xCAT-client/bin/mysqlsetup | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xCAT-client/bin/mysqlsetup b/xCAT-client/bin/mysqlsetup index edce88e6b..588db7011 100755 --- a/xCAT-client/bin/mysqlsetup +++ b/xCAT-client/bin/mysqlsetup @@ -930,9 +930,12 @@ sub initmysqldb $cmd = "$sqlcmd --user=mysql"; #on rhels7.7, /usr/bin/mysql_install_db requires /usr/libexec/resolveip, #but it's available at the /usr/bin/resolveip - #use --force to grant table entries use ipaddress instead of hostname if ($::linuxos == "rhels7.7") { - $cmd = "$cmd --force"; + my $resolveip="/usr/libexec/resolveip"; + if (!(-x ($resolveip))) { + my $linkcmd="ln -s /usr/bin/resolveip $resolveip"; + xCAT::Utils->runcmd($linkcmd, 0); + } } } xCAT::Utils->runcmd($cmd, 0);