diff --git a/postgresql-install-alternatives b/postgresql-install-alternatives index 0f1f0be..1729902 100644 --- a/postgresql-install-alternatives +++ b/postgresql-install-alternatives @@ -2,13 +2,22 @@ shopt -s nullglob -if test "$#" -ne 2; then - echo "usage: $0 basedir priority" 1>&2 +if test "$#" -ne 1; then + echo "usage: $0 pgversion" 1>&2 exit 1 fi -PGBASEDIR=$1 -PRIO=$2 +PRIO=$1 +case "$PRIO" in + postgresql*) + PRIO="${PRIO##postgresql}" + ;; +esac + +PGBASEDIR=/usr/lib/postgresql$PRIO +if [ $PRIO -lt 80 ] ; then + PRIO="${PRIO}0" +fi PGBINDIR=$PGBASEDIR/bin diff --git a/postgresql.changes b/postgresql.changes index 9c0e001..ac2fc14 100644 --- a/postgresql.changes +++ b/postgresql.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Fri Nov 24 11:24:09 UTC 2017 - mrueckert@suse.de + +- instead of hardcoding version 10, just check if the prio is + smaller than 80. + +------------------------------------------------------------------- +Thu Nov 23 17:05:21 UTC 2017 - mrueckert@suse.de + +- simplify the postgresql-install-alternatives to only require the + pg version and go from there. + + supported calls of the script are: + /usr/share/postgresql/install-alternatives postgresqlXY + /usr/share/postgresql/install-alternatives XY + + where XY can currently be: 92 93 94 95 96 10 + ------------------------------------------------------------------- Wed Nov 22 13:03:42 UTC 2017 - max@suse.com