diff options
Diffstat (limited to 'ndb/src/mgmsrv/main.cpp')
-rw-r--r-- | ndb/src/mgmsrv/main.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ndb/src/mgmsrv/main.cpp b/ndb/src/mgmsrv/main.cpp index 07b369d4ebc..ec20101493e 100644 --- a/ndb/src/mgmsrv/main.cpp +++ b/ndb/src/mgmsrv/main.cpp @@ -121,6 +121,7 @@ struct MgmGlobals { }; int g_no_nodeid_checks= 0; +int g_print_full_config; static MgmGlobals *glob= 0; /****************************************************************************** @@ -147,6 +148,9 @@ static struct my_option my_long_options[] = { "config-file", 'f', "Specify cluster configuration file", (gptr*) &opt_config_filename, (gptr*) &opt_config_filename, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, + { "print-full-config", 'P', "Print full config and exit", + (gptr*) &g_print_full_config, (gptr*) &g_print_full_config, 0, + GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 }, { "daemon", 'd', "Run ndb_mgmd in daemon mode (default)", (gptr*) &opt_daemon, (gptr*) &opt_daemon, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0 }, @@ -208,7 +212,8 @@ int main(int argc, char** argv) exit(ho_error); if (opt_interactive || - opt_non_interactive) { + opt_non_interactive || + g_print_full_config) { opt_daemon= 0; } @@ -220,6 +225,9 @@ int main(int argc, char** argv) opt_config_filename, opt_connect_str); + if (g_print_full_config) + goto the_end; + if (glob->mgmObject->init()) goto error_end; @@ -358,6 +366,7 @@ int main(int argc, char** argv) glob->mgmObject->get_config_retriever()->disconnect(); glob->socketServer->stopSessions(true); g_eventLogger.info("Shutdown complete"); + the_end: delete glob; ndb_end(opt_endinfo ? MY_CHECK_ERROR | MY_GIVE_INFO : 0); return 0; |