Commit 734fdcdf authored by unknown's avatar unknown

fixed some help tests for ndb executables

parent ba72b450
......@@ -50,7 +50,7 @@ Configuration::init(int argc, const char** argv){
/**
* Default values for arguments
*/
int _start = 1;
int _no_start = 0;
int _initial = 0;
const char* _connect_str = NULL;
int _deamon = 0;
......@@ -60,14 +60,18 @@ Configuration::init(int argc, const char** argv){
/**
* Arguments to NDB process
*/
struct getargs args[] = {
{ "version", 'v', arg_flag, &_print_version, "Print version", "" },
{ "start", 's', arg_flag, &_start, "Start ndb immediately", "" },
{ "nostart", 'n', arg_negative_flag, &_start, "Don't start ndb immediately", "" },
{ "deamon", 'd', arg_flag, &_deamon, "Start ndb as deamon", "" },
{ "initial", 'i', arg_flag, &_initial, "Start ndb immediately", "" },
{ "connect-string", 'c', arg_string, &_connect_str, "\"nodeid=<id>;host=<hostname:port>\"\n", "constr" },
struct getargs args[] = {
{ "version", 'v', arg_flag, &_print_version, "Print ndbd version", "" },
{ "nostart", 'n', arg_flag, &_no_start,
"Don't start ndbd immediately. Ndbd will await command from ndb_mgmd", "" },
{ "daemon", 'd', arg_flag, &_deamon, "Start ndbd as daemon", "" },
{ "initial", 'i', arg_flag, &_initial,
"Perform initial start of ndbd, e.g. clean file system. Consult documentation before using this", "" },
{ "connect-string", 'c', arg_string, &_connect_str,
"Set connect string for connecting to ndb_mgmd. <constr>=\"host=<hostname:port>[;nodeid=<id>]\". Overides specifying entries in NDB_CONNECTSTRING and config file",
"<constr>" },
{ "usage", '?', arg_flag, &_help, "Print help", "" }
};
int num_args = sizeof(args) / sizeof(args[0]);
......@@ -81,7 +85,7 @@ Configuration::init(int argc, const char** argv){
}
#if 0
ndbout << "start=" <<_start<< endl;
ndbout << "no_start=" <<_no_start<< endl;
ndbout << "initial=" <<_initial<< endl;
ndbout << "deamon=" <<_deamon<< endl;
ndbout << "connect_str="<<_connect_str<<endl;
......@@ -97,10 +101,10 @@ Configuration::init(int argc, const char** argv){
}
// Check the start flag
if (_start)
globalData.theRestartFlag = perform_start;
else
if (_no_start)
globalData.theRestartFlag = initial_state;
else
globalData.theRestartFlag = perform_start;
// Check the initial flag
if (_initial)
......
......@@ -51,7 +51,7 @@ int main(int argc, const char** argv){
int _try_reconnect = 0;
struct getargs args[] = {
{ "try-reconnect", 0, arg_integer, &_try_reconnect, "", "" },
{ "try-reconnect", 't', arg_integer, &_try_reconnect, "Specify number of retries for connecting to ndb_mgmd, default infinite", "#" },
{ "usage", '?', arg_flag, &_help, "Print help", "" },
};
int num_args = sizeof(args) / sizeof(args[0]); /* Number of arguments */
......
......@@ -99,16 +99,16 @@ extern int global_mgmt_server_check;
int _print_version = 0;
struct getargs args[] = {
{ "version", 0, arg_flag, &_print_version,
"Print versions"},
{ NULL, 'c', arg_string, &glob.config_filename,
"Running cluster configuration file", "filename" },
{ NULL, 'd', arg_flag, &glob.daemon,
"Daemon mode" },
{ "version", 'v', arg_flag, &_print_version,
"Print ndb_mgmd version"},
{ "config-file", 'c', arg_string, &glob.config_filename,
"Specify cluster configuration file", "filename" },
{ "daemon", 'd', arg_flag, &glob.daemon,
"Run ndb_mgmd in daemon mode" },
{ NULL, 'l', arg_string, &glob.local_config_filename,
"Local configuration file (Ndb.cfg)",
"Specify configuration file connect string (will default use Ndb.cfg if available)",
"filename" },
{ NULL, 'n', arg_flag, &glob.non_interactive,
{ "nodaemon", 'n', arg_flag, &glob.non_interactive,
"Don't run as daemon, but don't read from stdin", "non-interactive" }
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment