* debian/pg_clonecluster_patroni, debian/pg_createcluster_patroni: Support
both '/' and '-' as version/clustername separator.
This commit is contained in:
parent
d11ed3d0ec
commit
8aab65cd6c
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -2,6 +2,8 @@ patroni (1.5.0-11) UNRELEASED; urgency=medium
|
|||
|
||||
[ Michael Banck ]
|
||||
* debian/patroni.install: Install debian/tmp/usr/lib into patroni package.
|
||||
* debian/pg_clonecluster_patroni, debian/pg_createcluster_patroni: Support
|
||||
both '/' and '-' as version/clustername separator.
|
||||
|
||||
-- Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org> Fri, 26 Oct 2018 12:48:28 +0100
|
||||
|
||||
|
|
11
debian/pg_clonecluster_patroni
vendored
11
debian/pg_clonecluster_patroni
vendored
|
@ -25,8 +25,15 @@ case $i in
|
|||
esac
|
||||
done
|
||||
|
||||
VERSION=$(echo $SCOPE | sed -e 's/\/.*//')
|
||||
CLUSTER=$(echo $SCOPE | sed -e 's/.*\///')
|
||||
# support both '-' and '/' as separator
|
||||
if [ $(echo $SCOPE | grep -- -) ]
|
||||
then
|
||||
VERSION=$(echo $SCOPE | sed -e 's/-.*//')
|
||||
CLUSTER=$(echo $SCOPE | sed -e 's/.*-//')
|
||||
else
|
||||
VERSION=$(echo $SCOPE | sed -e 's/\/.*//')
|
||||
CLUSTER=$(echo $SCOPE | sed -e 's/.*\///')
|
||||
fi
|
||||
|
||||
if [ -f /etc/postgresql/$VERSION/$CLUSTER/postgresql.conf ]
|
||||
then
|
||||
|
|
11
debian/pg_createcluster_patroni
vendored
11
debian/pg_createcluster_patroni
vendored
|
@ -17,8 +17,15 @@ case $i in
|
|||
esac
|
||||
done
|
||||
|
||||
VERSION=$(echo $SCOPE | sed -e 's/\/.*//')
|
||||
CLUSTER=$(echo $SCOPE | sed -e 's/.*\///')
|
||||
# support both '-' and '/' as separator
|
||||
if [ $(echo $SCOPE | grep -- -) ]
|
||||
then
|
||||
VERSION=$(echo $SCOPE | sed -e 's/-.*//')
|
||||
CLUSTER=$(echo $SCOPE | sed -e 's/.*-//')
|
||||
else
|
||||
VERSION=$(echo $SCOPE | sed -e 's/\/.*//')
|
||||
CLUSTER=$(echo $SCOPE | sed -e 's/.*\///')
|
||||
fi
|
||||
|
||||
pg_createcluster $VERSION $CLUSTER
|
||||
exit $?
|
||||
|
|
Loading…
Reference in a new issue