1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-05 16:15:50 +03:00

fix addmodule procmgr issue

This commit is contained in:
david hill
2016-04-21 16:57:09 -05:00
parent 7f3c6dbb6e
commit 670631293e
2 changed files with 8 additions and 0 deletions

View File

@@ -8477,6 +8477,8 @@ namespace oam
******************************************************************************************/ ******************************************************************************************/
std::string Oam::updateFstab(std::string device, std::string dbrootID) std::string Oam::updateFstab(std::string device, std::string dbrootID)
{ {
writeLog("updateFstab called: " + device + ":" + dbrootID, LOG_TYPE_INFO );
//check if entry already exist //check if entry already exist
string cmd = "grep /data" + dbrootID + " /etc/fstab /dev/null 2>&1"; string cmd = "grep /data" + dbrootID + " /etc/fstab /dev/null 2>&1";
int status = system(cmd.c_str()); int status = system(cmd.c_str());

View File

@@ -1714,6 +1714,12 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO
string entry; string entry;
msg >> entry; msg >> entry;
//check if entry already exist
string cmd = "grep " + entry + " /etc/fstab /dev/null 2>&1";
int status = system(cmd.c_str());
if (WEXITSTATUS(status) == 0 )
break;
string cmd = "echo " + entry + " >> /etc/fstab"; string cmd = "echo " + entry + " >> /etc/fstab";
system(cmd.c_str()); system(cmd.c_str());