2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-21 19:22:05 +00:00

let mysqlsetup work when using alias IP as MN IP (#5279)

* let mysqlsetup work when using alias IP as MN IP
This commit is contained in:
Yuan Bai 2018-06-06 15:25:11 +08:00 committed by Bin Xu
parent 1c1eace773
commit 7576e04e24

View File

@ -338,6 +338,7 @@ if ((($odbconly == 0) && ($::xcatrunningmysql == 0)) || $::UPDATE || $::SETUPLL)
}
# initial setup request, if not already running mysql
my $hostfile_configured=0;
if (($::INIT) && ($::xcatrunningmysql == 0))
{
# MySQL not running, then initialize the database
@ -443,6 +444,12 @@ if (($::INIT) && ($::xcatrunningmysql == 0))
#
&createcfgloc;
if ($::HOSTFILE)
{
&addhosts;
$hostfile_configured=1
}
#
# Restore backed up database into MySQL
#
@ -481,7 +488,7 @@ if ($::SETUPLL)
# if input a list of hosts to add to the database, to give access to MySQL
if ($::HOSTFILE)
if (($::HOSTFILE) && ($hostfile_configured == 0))
{
&addhosts;