diff --git a/oamapps/mcsadmin/mcsadmin.cpp b/oamapps/mcsadmin/mcsadmin.cpp index e90e31559..8e304cc6e 100644 --- a/oamapps/mcsadmin/mcsadmin.cpp +++ b/oamapps/mcsadmin/mcsadmin.cpp @@ -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); diff --git a/oamapps/postConfigure/postConfigure.cpp b/oamapps/postConfigure/postConfigure.cpp index 98d637a6d..02151c772 100644 --- a/oamapps/postConfigure/postConfigure.cpp +++ b/oamapps/postConfigure/postConfigure.cpp @@ -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";