summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2015-02-27 09:57:24 +0100
committerPavel Raiskup <praiskup@redhat.com>2015-02-27 09:57:24 +0100
commit09cc145b8bd877966f5efe739597d6338ab2d1a4 (patch)
tree4d04ebb78e08c88ebc2ddcded95a45ff37fac988
parenta8a3f7cbb9e46d946d9c0d7f8e8d547ad35a5a2c (diff)
downloadpostgresql-setup-09cc145b8bd877966f5efe739597d6338ab2d1a4.tar.gz
postgresql-setup-09cc145b8bd877966f5efe739597d6338ab2d1a4.tar.xz
postgresql-setup-09cc145b8bd877966f5efe739597d6338ab2d1a4.zip
configury: add NAME_DEFAULT_PREV_SERVICE variable
We may want to configure postgresql-setup to upgrade from SCL version of PostgreSQL, which needs to read 'postgresql92-postgresq' service files. Defaults to 'postgresql'. * configure.ac (NAME_DEFAULT_PREV_SERVICE): New configure var. * postgresql-setup.in ($option_upgradefrom): Default to NAME_DEFAULT_PREV_SERVICE contents.
-rw-r--r--configure.ac3
-rw-r--r--postgresql-setup.in2
2 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index c419e0e..a6ed1fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,6 +209,9 @@ PGSETUP_SUBST_OPT([NAME_PKG_PFX], [],
[package name prefix, like (PFX)postgresql.rpm])
PGSETUP_SUBST_OPT([NAME_PKG_SFX], [],
[package name suffix, like postgresql(SFX).rpm])
+PGSETUP_SUBST_OPT([NAME_DEFAULT_PREV_SERVICE], [postgresql],
+ [name of service to upgrade from by default (defaults to
+ 'postgresql'])
NAME_BINARYBASE="$NAME_BIN_PFX""postgresql$NAME_BIN_SFX"
NAME_PACKAGE="$NAME_PKG_PFX""postgresql$NAME_PKG_SFX"
diff --git a/postgresql-setup.in b/postgresql-setup.in
index fc377ff..e0c3184 100644
--- a/postgresql-setup.in
+++ b/postgresql-setup.in
@@ -22,7 +22,7 @@ SU_POSTGRES="@SU_POSTGRES@"
PGPORT_DEF=5432
# We upgrade by default from system's default PostgreSQL installation
-option_upgradefrom="postgresql"
+option_upgradefrom="@NAME_DEFAULT_PREV_SERVICE@"
USAGE_STRING=$"\
Usage: $0 MODE_OPTION [--unit=UNIT_NAME] [OPTION...]