1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-11-02 06:13:16 +03:00

change addmodule password code

This commit is contained in:
david hill
2016-04-12 10:15:02 -05:00
parent 96339e4965
commit 2a0e1629e8

View File

@@ -4462,9 +4462,6 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
// Verify Host IP and Password // Verify Host IP and Password
// //
// This is the password that is set in a amazon AMI
string amazonDefaultPassword = "root";
if ( password == "ssh" && amazon ) if ( password == "ssh" && amazon )
{ // check if there is a root password stored { // check if there is a root password stored
string rpw = oam::UnassignedName; string rpw = oam::UnassignedName;
@@ -4581,7 +4578,7 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
continue; continue;
} }
string cmd = installDir + "/bin/remote_command.sh " + IPAddr + " " + amazonDefaultPassword + " 'ls' 1 > /tmp/login_test.log"; string cmd = installDir + "/bin/remote_command.sh " + IPAddr + " " + password + " 'ls' 1 > /tmp/login_test.log";
system(cmd.c_str()); system(cmd.c_str());
if (WEXITSTATUS(rtnCode) != 0) { if (WEXITSTATUS(rtnCode) != 0) {
//check for RSA KEY ISSUE and fix //check for RSA KEY ISSUE and fix
@@ -5007,7 +5004,7 @@ int ProcessManager::addModule(oam::DeviceNetworkList devicenetworklist, std::str
//set root password //set root password
if (amazon) { if (amazon) {
cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + remoteModuleIP + " " + amazonDefaultPassword + " '/root/updatePassword.sh " + password + "' > /tmp/password_change.log"; cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + remoteModuleIP + " " + password + " '/root/updatePassword.sh " + password + "' > /tmp/password_change.log";
//log.writeLog(__LINE__, "addModule - cmd: " + cmd, LOG_TYPE_DEBUG); //log.writeLog(__LINE__, "addModule - cmd: " + cmd, LOG_TYPE_DEBUG);
rtnCode = system(cmd.c_str()); rtnCode = system(cmd.c_str());
if (WEXITSTATUS(rtnCode) == 0) if (WEXITSTATUS(rtnCode) == 0)