1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

change lock directory

This commit is contained in:
david hill
2018-05-23 10:16:58 -05:00
parent 6613a9f7e7
commit faef2f820a
4 changed files with 46 additions and 11 deletions

View File

@ -147,6 +147,19 @@ Oam::Oam()
}
catch (...) {} // defaulted to false
}
//get user
string USER = "root";
char* p = getenv("USER");
if (p && *p)
USER = p;
userDir = USER;
if ( USER != "root")
userDir = "home/" + USER;
}
Oam::~Oam()
@ -10669,10 +10682,12 @@ bool Oam::checkSystemRunning()
// string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log";
// system(cmd.c_str());
struct stat st;
if (stat("/var/lock/subsys/columnstore", &st) == 0)
string lockFile = userDir + "/columnstore";
if (stat(lockFile.c_str(), &st) == 0)
{
return true;
return true;
}
if (geteuid() != 0)