1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-09-02 12:41:17 +03:00

change code to determine package type

This commit is contained in:
David Hill
2017-03-16 15:58:19 -05:00
parent 4392e4ed9f
commit d4225d6635
2 changed files with 11 additions and 11 deletions

View File

@@ -5007,13 +5007,13 @@ int processCommand(string* arguments)
cout << endl;
if ( rootUser)
{
system("rpm -qi mariadb-columnstore-platform > /tmp/columnstore.txt 2>&1");
if (oam.checkLogStatus("/tmp/columnstore.txt", "Name"))
system("cat /tmp/columnstore.txt");
else {
system("dpkg -s mariadb-columnstore-platform > /tmp/columnstore.txt 2>&1");
if (oam.checkLogStatus("/tmp/columnstore.txt", "Status: install"))
system("cat /tmp/columnstore.txt");
int rtnCode = system("rpm -qi mariadb-columnstore-platform > /tmp/columnstore.txt 2>&1");
if (WEXITSTATUS(rtnCode) == 0)
system("cat /tmp/columnstore.txt");
else {
rtnCode = system("dpkg -s mariadb-columnstore-platform > /tmp/columnstore.txt 2>&1");
if (WEXITSTATUS(rtnCode) == 0)
system("cat /tmp/columnstore.txt");
else {
SystemSoftware systemsoftware;
oam.getSystemSoftware(systemsoftware);

View File

@@ -2683,12 +2683,12 @@ int main(int argc, char *argv[])
EEPackageType = "binary";
else
{
system("rpm -qi mariadb-columnstore-platform > /tmp/columnstore.txt 2>&1");
if (oam.checkLogStatus("/tmp/columnstore.txt", "Name"))
int rtnCode = system("rpm -qi mariadb-columnstore-platform > /tmp/columnstore.txt 2>&1");
if (WEXITSTATUS(rtnCode) == 0)
EEPackageType = "rpm";
else {
system("dpkg -s mariadb-columnstore-platform > /tmp/columnstore.txt 2>&1");
if (oam.checkLogStatus("/tmp/columnstore.txt", "Status: install"))
rtnCode = system("dpkg -s mariadb-columnstore-platform > /tmp/columnstore.txt 2>&1");
if (WEXITSTATUS(rtnCode) == 0)
EEPackageType = "deb";
else
EEPackageType = "binary";