You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-1498 - add prompt for password on non-distibute installs
This commit is contained in:
@ -3090,7 +3090,9 @@ int main(int argc, char *argv[])
|
||||
//check if dbrm data resides in older directory path and inform user if it does
|
||||
dbrmDirCheck();
|
||||
|
||||
if ( IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM && pmNumber == 1) {
|
||||
if ( ( IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM ) ||
|
||||
( (IserverTypeInstall != oam::INSTALL_COMBINE_DM_UM_PM) && pmwithum ) )
|
||||
{
|
||||
//run the mysql / mysqld setup scripts
|
||||
cout << endl << "===== Running the MariaDB ColumnStore MariaDB Server setup scripts =====" << endl << endl;
|
||||
|
||||
@ -3098,7 +3100,61 @@ int main(int argc, char *argv[])
|
||||
|
||||
// call the mysql setup scripts
|
||||
mysqlSetup();
|
||||
sleep(5);
|
||||
sleep(3);
|
||||
}
|
||||
|
||||
if ( IserverTypeInstall != oam::INSTALL_COMBINE_DM_UM_PM ||
|
||||
pmNumber > 1 ) {
|
||||
|
||||
if ( password.empty() )
|
||||
{
|
||||
cout << endl;
|
||||
cout << "Next step is to enter the password to access the other Servers." << endl;
|
||||
cout << "This is either your password or you can default to using a ssh key" << endl;
|
||||
cout << "If using a password, the password needs to be the same on all Servers." << endl << endl;
|
||||
}
|
||||
|
||||
while(true)
|
||||
{
|
||||
char *pass1, *pass2;
|
||||
|
||||
if ( noPrompting ) {
|
||||
cout << "Enter password, hit 'enter' to default to using a ssh key, or 'exit' > " << endl;
|
||||
if ( password.empty() )
|
||||
password = "ssh";
|
||||
break;
|
||||
}
|
||||
|
||||
//check for command line option password
|
||||
//if ( !password.empty() )
|
||||
// break;
|
||||
|
||||
pass1=getpass("Enter password, hit 'enter' to default to using a ssh key, or 'exit' > ");
|
||||
if ( strcmp(pass1, "") == 0 ) {
|
||||
password = "ssh";
|
||||
break;
|
||||
}
|
||||
|
||||
string p1 = pass1;
|
||||
if ( p1 == "exit")
|
||||
exit(0);
|
||||
|
||||
pass2=getpass("Confirm password > ");
|
||||
string p2 = pass2;
|
||||
if ( p1 == p2 ) {
|
||||
password = p2;
|
||||
break;
|
||||
}
|
||||
else
|
||||
cout << "Password mismatch, please re-enter" << endl;
|
||||
}
|
||||
|
||||
//add single quote for special characters
|
||||
if ( password != "ssh" )
|
||||
{
|
||||
password = "'" + password + "'";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int thread_id = 0;
|
||||
@ -3173,7 +3229,7 @@ int main(int argc, char *argv[])
|
||||
if( !pkgCheck(columnstorePackage) )
|
||||
exit(1);
|
||||
|
||||
if ( password.empty() )
|
||||
/* if ( password.empty() )
|
||||
{
|
||||
cout << endl;
|
||||
cout << "Next step is to enter the password to access the other Servers." << endl;
|
||||
@ -3221,10 +3277,10 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
password = "'" + password + "'";
|
||||
}
|
||||
|
||||
*/
|
||||
checkSystemMySQLPort(mysqlPort, sysConfig, USER, password, childmodulelist, IserverTypeInstall, pmwithum);
|
||||
|
||||
if ( ( IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM ) ||
|
||||
/* if ( ( IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM ) ||
|
||||
( (IserverTypeInstall != oam::INSTALL_COMBINE_DM_UM_PM) && pmwithum ) )
|
||||
{
|
||||
cout << endl << "===== Running the MariaDB ColumnStore MariaDB ColumnStore setup scripts =====" << endl << endl;
|
||||
@ -3233,7 +3289,7 @@ int main(int argc, char *argv[])
|
||||
mysqlSetup();
|
||||
sleep(5);
|
||||
}
|
||||
|
||||
*/
|
||||
string AmazonInstall = "0";
|
||||
if ( amazonInstall )
|
||||
AmazonInstall = "1";
|
||||
@ -3411,7 +3467,7 @@ int main(int argc, char *argv[])
|
||||
cout << " DONE" << endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
/* else
|
||||
{
|
||||
if ( ( IserverTypeInstall == oam::INSTALL_COMBINE_DM_UM_PM ) ||
|
||||
( (IserverTypeInstall != oam::INSTALL_COMBINE_DM_UM_PM) && pmwithum ) )
|
||||
@ -3423,7 +3479,7 @@ int main(int argc, char *argv[])
|
||||
sleep(5);
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
//configure data redundancy
|
||||
if (DataRedundancy)
|
||||
{
|
||||
|
Reference in New Issue
Block a user