1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-07 03:22:57 +03:00

change to use local lock file directory for nonroot

This commit is contained in:
david hill
2018-05-24 10:33:46 -05:00
parent faef2f820a
commit e70c947977
8 changed files with 55 additions and 22 deletions

View File

@@ -10682,8 +10682,18 @@ bool Oam::checkSystemRunning()
// string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log";
// system(cmd.c_str());
struct stat st;
string lockFileDir = "/var/subsys/lock";
string lockFile = userDir + "/columnstore";
try
{
Config* sysConfig = Config::makeConfig(CalpontConfigFile.c_str());
lockFileDir = sysConfig->getConfig("Installation", "LockFileDirectory");
}
catch (...)
{} // defaulted to false
string lockFile = lockFileDir + "/columnstore";
if (stat(lockFile.c_str(), &st) == 0)
{