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

fix non-root fstab permission issue

This commit is contained in:
David Hill
2016-11-20 00:10:21 +00:00
parent 32db3bfc86
commit e29f7b22ea

View File

@@ -4981,7 +4981,12 @@ void setSystemName()
*/
bool copyFstab(string moduleName)
{
string cmd = "/bin/cp -f /etc/fstab " + installDir + "/local/etc/" + moduleName + "/. > /dev/null 2>&1";
string cmd;
if ( rootUser)
cmd = "/bin/cp -f /etc/fstab " + installDir + "/local/etc/" + moduleName + "/. > /dev/null 2>&1";
else
cmd = "/sudo bin/cp -f /etc/fstab " + installDir + "/local/etc/" + moduleName + "/. > /dev/null 2>&1";
system(cmd.c_str());
return true;