2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-21 18:50:28 +00:00

mysqlsetup failed becuase /usr/bin/mysql_install_db is not available (#1702)

* mysqlsetup failed becuase /usr/bin/mysql_install_db is not available

* use variable

* chang "-e" to "-x"
This commit is contained in:
cxhong
2016-08-17 19:44:19 -04:00
committed by yangsong
parent 13388737ac
commit 9181279913

View File

@@ -916,7 +916,13 @@ sub initmysqldb
}
else
{
$cmd = "/usr/bin/mysql_install_db --user=mysql";
my $sqlcmd = "/usr/bin/mysql_install_db";
if (!(-x ($sqlcmd))) {
xCAT::MsgUtils->message("E", "$sqlcmd is not available, please install required mysql/mariadb packages");
exit(1);
}
$cmd = "$sqlcmd --user=mysql";
}
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)