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

fix non-root fstab permission issue

This commit is contained in:
David Hill
2016-11-20 00:12:49 +00:00
parent e29f7b22ea
commit 2f366aa1bc

View File

@@ -8540,8 +8540,13 @@ namespace oam
{ {
writeLog("updateFstab called: " + device + ":" + dbrootID, LOG_TYPE_DEBUG ); writeLog("updateFstab called: " + device + ":" + dbrootID, LOG_TYPE_DEBUG );
//check if entry already exist //check if entry already exist
string cmd = "grep /data" + dbrootID + " /etc/fstab > /dev/null 2>&1"; string cmd;
if (user == 0)
cmd = "grep /data" + dbrootID + " /etc/fstab > /dev/null 2>&1";
else
cmd = "sudo grep /data" + dbrootID + " /etc/fstab > /dev/null 2>&1";
int status = system(cmd.c_str()); int status = system(cmd.c_str());
if (WEXITSTATUS(status) == 0 ) if (WEXITSTATUS(status) == 0 )
return ""; return "";