From 0c4c172d6ed8bbb2bbfcf360244468a9ef51e3ed Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Thu, 18 Sep 2014 16:19:54 +0200 Subject: postgresql-setup: leftovers, user feeling * postgresql-setup.in (USAGE_STRING): Mention --port option. (initdb): Mention in info output the non-standard port, when used. * postgresql-setup.in: Do not throw the default-port message always, remved remaining sysconfig leftover. * NEWS: Mention that env files are now supported. --- postgresql-setup.in | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'postgresql-setup.in') diff --git a/postgresql-setup.in b/postgresql-setup.in index ddefea1..bd47f98 100644 --- a/postgresql-setup.in +++ b/postgresql-setup.in @@ -27,8 +27,6 @@ README_DIST=@README_DIST@ # Home directory of postgres user POSTGRES_HOMEDIR=@POSTGRES_HOMEDIR@ -SYSCONFIG_DIR=@PKGCONFIG_DIR@ - SU=@SU@ # The where PostgreSQL server listens by default @@ -54,6 +52,8 @@ to $PGMAJORVERSION). Options: --unit unit ID of PostgreSQL to run against + --port port where the server will listen for connections + --help show this help --version show version of this package --debug show basic debugging information @@ -147,9 +147,13 @@ initdb() error $"Data directory $pgdata is not empty!" script_result=1 else - info $"Initializing database in $pgdata." + port_info= + test "$pgport" != "$PGPORT_DEF" \ + && port_info=$", listening on port '$pgport'" + + info $"Initializing database in '$pgdata'$port_info" if perform_initdb; then - info $"Initialized, logs are in ${initdb_log}." + info $"Initialized, logs are in ${initdb_log}" else error $"Initializing database failed, see $initdb_log" script_result=1 @@ -496,14 +500,13 @@ test "$option_mode" = upgrade -a "$pgport" = default \ # This is mostly for 'initdb'. We assume that the default port is $PGPORT_DEF # if not set explicitly (only for default service name 'postgresql'). if test "$pgport" = default -a $option_service == postgresql; then - info $"Using the default port '$PGPORT_DEF'." + debug $"Using the default port '$PGPORT_DEF'" pgport=$PGPORT_DEF fi test "$pgport" = default \ && die $"\ -Port is not set by postgresql.conf, '$SYSCONFIG_DIR/$option_service' \ -nor by --port." +Port is not set by postgresql.conf nor by --port." # These variables are read by underlying utilites, rather export them. export PGDATA=$pgdata -- cgit