1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-11-02 06:13:16 +03:00
This commit is contained in:
david hill
2017-06-28 16:11:24 -05:00
parent d9a1e1204d
commit 9f475233a4

View File

@@ -3982,7 +3982,7 @@ bool makeRClocal(string moduleType, string moduleName, int IserverTypeInstall)
if ( lines.begin() == lines.end())
return true;
string fileName = "/etc/rc.local";
string fileName = "/tmp/rc.local";
ofstream newFile (fileName.c_str());
@@ -3993,7 +3993,14 @@ bool makeRClocal(string moduleType, string moduleName, int IserverTypeInstall)
newFile.close();
close(fd);
if (rootUser)
system("cat /tmp/rc.local >> /etc/rc.local > /dev/null");
else
system("sudo cat /tmp/rc.local >> /etc/rc.local > /dev/null");
unlink(fileName.c_str());
return true;
}