diff --git a/debian/changelog b/debian/changelog index d3222e2..cf0cea0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ patroni (1.5.5-2) UNRELEASED; urgency=medium [ Michael Banck ] * debian/pg_createconfig_patroni: Filter out comments from /etc/patroni/dcs.yml when assembling the Patroni configuration file. + * debian/pg_createconfig_patroni: Fix determination of host IP/network if `ip + route get' reports additional output (Closes: #930015). -- Debian PostgreSQL Maintainers Sat, 16 Feb 2019 07:30:36 +0100 diff --git a/debian/pg_createconfig_patroni b/debian/pg_createconfig_patroni index 0688ac6..739ad69 100755 --- a/debian/pg_createconfig_patroni +++ b/debian/pg_createconfig_patroni @@ -92,11 +92,11 @@ HOSTNAME=$(hostname) # set default ipv4 address in case it was not provided if [ -z "$HOSTIP" ]; then - HOSTIP=$(ip -4 route get 8.8.8.8 | grep ^8.8.8.8 | sed -e s/.*src.// -e s/\ //g) + HOSTIP=$(ip -4 route get 8.8.8.8 | grep ^8.8.8.8 | sed -e s/.*src.// -e s/\ .*//g) fi if [ -z "$NETWORK" ]; then - NETWORK=$(ip -4 route get 8.8.8.8 | grep ^8.8.8.8 | sed -e s/.*src.// -e s/\ //g -e s/\.[0-9]*$/.0/)/24 + NETWORK=$(ip -4 route get 8.8.8.8 | grep ^8.8.8.8 | sed -e s/.*src.// -e s/\ .*//g -e s/\.[0-9]*$/.0/)/24 fi # add remaining patroni configuration from template