You've already forked mariadb-columnstore-engine
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:
@@ -8541,7 +8541,12 @@ 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 "";
|
||||||
|
Reference in New Issue
Block a user