From 09cc145b8bd877966f5efe739597d6338ab2d1a4 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Fri, 27 Feb 2015 09:57:24 +0100 Subject: 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. --- configure.ac | 3 +++ postgresql-setup.in | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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...] -- cgit