diff options
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/initdb/initdb.c | 39 | ||||
| -rw-r--r-- | src/bin/initgtm/initgtm.c | 43 |
2 files changed, 48 insertions, 34 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 69c75611d6..2ab3cb5386 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -3784,22 +3784,29 @@ main(int argc, char *argv[]) #ifdef PGXC - printf(_("\nSuccess.\n You can now start the database server of the Postgres-XL coordinator using:\n\n" - " %s%s%spostgres%s --coordinator -D %s%s%s\n" - "or\n" - " %s%s%spg_ctl%s start -D %s%s%s -Z coordinator -l logfile\n\n" - " You can now start the database server of the Postgres-XL datanode using:\n\n" - " %s%s%spostgres%s --datanode -D %s%s%s\n" - "or \n" - " %s%s%spg_ctl%s start -D %s%s%s -Z datanode -l logfile\n\n"), - QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH, - QUOTE_PATH, pgdata_native, QUOTE_PATH, - QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH, - QUOTE_PATH, pgdata_native, QUOTE_PATH, - QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH, - QUOTE_PATH, pgdata_native, QUOTE_PATH, - QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH, - QUOTE_PATH, pgdata_native, QUOTE_PATH); + printf(_("\nSuccess.\n")); + { + char *pgxc_ctl_silent = getenv("PGXC_CTL_SILENT"); + if (!pgxc_ctl_silent || !strlen(pgxc_ctl_silent)) + { + printf(_("You can now start the database server of the Postgres-XL coordinator using:\n\n" + " %s%s%spostgres%s --coordinator -D %s%s%s\n" + "or\n" + " %s%s%spg_ctl%s start -D %s%s%s -Z coordinator -l logfile\n\n" + " You can now start the database server of the Postgres-XL datanode using:\n\n" + " %s%s%spostgres%s --datanode -D %s%s%s\n" + "or \n" + " %s%s%spg_ctl%s start -D %s%s%s -Z datanode -l logfile\n\n"), + QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH, + QUOTE_PATH, pgdata_native, QUOTE_PATH, + QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH, + QUOTE_PATH, pgdata_native, QUOTE_PATH, + QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH, + QUOTE_PATH, pgdata_native, QUOTE_PATH, + QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH, + QUOTE_PATH, pgdata_native, QUOTE_PATH); + } + } #else printf(_("\nSuccess. You can now start the database server using:\n\n" " %s%s%spg_ctl%s -D %s%s%s -l logfile start\n\n"), diff --git a/src/bin/initgtm/initgtm.c b/src/bin/initgtm/initgtm.c index 7e1d002e52..4e77b41c62 100644 --- a/src/bin/initgtm/initgtm.c +++ b/src/bin/initgtm/initgtm.c @@ -1114,24 +1114,31 @@ main(int argc, char *argv[]) strcpy(bin_dir, argv[0]); get_parent_directory(bin_dir); - if (is_gtm) - printf(_("\nSuccess. You can now start the GTM server using:\n\n" - " %s%s%sgtm%s -D %s%s%s\n" - "or\n" - " %s%s%sgtm_ctl%s -Z gtm -D %s%s%s -l logfile start\n\n"), - QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH, - QUOTE_PATH, pg_data_native, QUOTE_PATH, - QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH, - QUOTE_PATH, pg_data_native, QUOTE_PATH); - else - printf(_("\nSuccess. You can now start the GTM proxy server using:\n\n" - " %s%s%sgtm_proxy%s -D %s%s%s\n" - "or\n" - " %s%s%sgtm_ctl%s -Z gtm_proxy -D %s%s%s -l logfile start\n\n"), - QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH, - QUOTE_PATH, pg_data_native, QUOTE_PATH, - QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH, - QUOTE_PATH, pg_data_native, QUOTE_PATH); + printf(_("\nSuccess.\n")); + { + char *pgxc_ctl_silent = getenv("PGXC_CTL_SILENT"); + if (!pgxc_ctl_silent || !strlen(pgxc_ctl_silent)) + { + if (is_gtm) + printf(_("You can now start the GTM server using:\n\n" + " %s%s%sgtm%s -D %s%s%s\n" + "or\n" + " %s%s%sgtm_ctl%s -Z gtm -D %s%s%s -l logfile start\n\n"), + QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH, + QUOTE_PATH, pg_data_native, QUOTE_PATH, + QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH, + QUOTE_PATH, pg_data_native, QUOTE_PATH); + else + printf(_("You can now start the GTM proxy server using:\n\n" + " %s%s%sgtm_proxy%s -D %s%s%s\n" + "or\n" + " %s%s%sgtm_ctl%s -Z gtm_proxy -D %s%s%s -l logfile start\n\n"), + QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH, + QUOTE_PATH, pg_data_native, QUOTE_PATH, + QUOTE_PATH, bin_dir, (strlen(bin_dir) > 0) ? DIR_SEP : "", QUOTE_PATH, + QUOTE_PATH, pg_data_native, QUOTE_PATH); + } + } return 0; } |
