From cc56924c20a4081880f86165c03e03323522cacd Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Tue, 10 Feb 2015 13:34:32 +0100 Subject: postgresql-setup: fix version in --version output And better spell errors (to let user know that the initdb_log may not exist). * postgresql-setup.in (print_version): Use "full" @PGVERSION@ and @PREVMAJORVERSION@.X to better describe what the package is configured for. (initdb): Spell better the failure message. * postgresql-setup.in: Use $* instead of $@. --- postgresql-setup.in | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'postgresql-setup.in') diff --git a/postgresql-setup.in b/postgresql-setup.in index f457636..4940da1 100644 --- a/postgresql-setup.in +++ b/postgresql-setup.in @@ -6,9 +6,6 @@ test -z "$PATH" && export PATH="/sbin:/usr/sbin:/bin:/usr/bin" test x"$PGSETUP_DEBUG" != x && set -x && PS4='${LINENO}: ' -# Full PostgreSQL version, e.g. 9.0.2 -PGVERSION=@PGVERSION@ - # Major version of PostgreSQL, e.g. 9.0 PGMAJORVERSION=@PGMAJORVERSION@ @@ -96,8 +93,8 @@ debug() { test "$option_debug" = "1" && echo >&2 $"DEBUG: $@"; } print_version() { echo "postgresql@DISTSUFF@-setup @VERSION@" - echo $"Built against PostgreSQL version @PGMAJORVERSION@ and configured" - echo $"to upgrade from PostgreSQL version @PREVMAJORVERSION@." + echo $"Built against PostgreSQL version @PGVERSION@ and configured" + echo $"to upgrade from PostgreSQL version @PREVMAJORVERSION@.X." } @@ -169,7 +166,7 @@ initdb() if perform_initdb; then info $"Initialized, logs are in ${initdb_log}" else - error $"Initializing database failed, see $initdb_log" + error $"Initializing database failed, possibly see $initdb_log" script_result=1 fi fi @@ -404,7 +401,7 @@ case "$1" in initdb|upgrade) fi set -- $additional_opts "$action" --unit "$service" "$@" - warn "arguments transformed to: ${0##*/} $@" + warn "arguments transformed to: ${0##*/} $*" esac # -- cgit