Bug 218 - add error message if MAXSCALE_HOME does not exist

This commit is contained in:
Mark Riddoch
2013-09-26 13:46:04 +02:00
parent c26bd04ea7
commit ab731274fd

View File

@ -305,6 +305,12 @@ fail_accept_errno = 0;
if ((home = getenv("MAXSCALE_HOME")) != NULL) if ((home = getenv("MAXSCALE_HOME")) != NULL)
{ {
if (access(home, R_OK) != 0)
{
fprintf(stderr,"The configured value of MAXSCALE_HOME '%s' does not exist.\n",
home);
exit(1);
}
sprintf(mysql_home, "%s/mysql", home); sprintf(mysql_home, "%s/mysql", home);
setenv("MYSQL_HOME", mysql_home, 1); setenv("MYSQL_HOME", mysql_home, 1);
/** /**