1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

MCOL-520 - sudo for mount amazon

This commit is contained in:
David Hill
2018-11-01 09:53:53 -05:00
parent efc69d86f4
commit ac7035e1cd
2 changed files with 10 additions and 3 deletions

View File

@ -93,8 +93,8 @@ if [ $module = "um" ]; then
echo "Setup UM Volume Mount" echo "Setup UM Volume Mount"
device=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation UMVolumeDeviceName$mid` device=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation UMVolumeDeviceName$mid`
mkdir -p $COLUMNSTORE_INSTALL_DIR/mysql/db > /dev/null 2>&1 mkdir -p $COLUMNSTORE_INSTALL_DIR/mysql/db > /dev/null 2>&1
mount $device $COLUMNSTORE_INSTALL_DIR/mysql/db -t ext2 -o noatime,nodiratime,noauto sudo mount $device $COLUMNSTORE_INSTALL_DIR/mysql/db -t ext2 -o noatime,nodiratime,noauto,user
chown mysql:mysql -R $COLUMNSTORE_INSTALL_DIR/mysql > /dev/null 2>&1 sudo chown $user:$user -R $COLUMNSTORE_INSTALL_DIR/mysql > /dev/null 2>&1
fi fi
fi fi
fi fi

View File

@ -212,7 +212,14 @@ int main(int argc, char* argv[])
} }
} }
string cmd = "chown mysql:mysql " + mycnfFile; string USER = "mysql";
char* p = getenv("USER");
if (p && *p)
USER = p;
string cmd = "chown " + USER + ":" + USER + " " + mycnfFile;
system(cmd.c_str()); system(cmd.c_str());
exit (0); exit (0);