From: Alan Date: Sun, 27 Jan 2019 05:00:14 +0000 (+0000) Subject: Corrects flaw in kea-admin util scripts for PostgreSQL X-Git-Tag: 426-cassandra-unit-tests-ends-with-success-even-though-they-fail_base~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d14e2f34c7d544aeb5e1e219f305fac9ab18c498;p=thirdparty%2Fkea.git Corrects flaw in kea-admin util scripts for PostgreSQL Support #14017 --- diff --git a/src/bin/admin/admin-utils.sh b/src/bin/admin/admin-utils.sh index 8b24e14d0f..7ecab1be15 100644 --- a/src/bin/admin/admin-utils.sh +++ b/src/bin/admin/admin-utils.sh @@ -62,11 +62,11 @@ pgsql_execute() { QUERY=$1 shift if [ $# -gt 0 ]; then - echo "${QUERY}" | psql --set ON_ERROR_STOP=1 -A -t -h localhost -q "$@" + echo "${QUERY}" | psql --set ON_ERROR_STOP=1 -A -t -h "${db_host}" -q "$@" retcode=$? else export PGPASSWORD=$db_password - echo "${QUERY}" | psql --set ON_ERROR_STOP=1 -A -t -h localhost -q -U "${db_user}" -d "${db_name}" + echo "${QUERY}" | psql --set ON_ERROR_STOP=1 -A -t -h "${db_host}" -q -U "${db_user}" -d "${db_name}" retcode=$? fi return $retcode @@ -86,11 +86,11 @@ pgsql_execute_script() { file=$1 shift if [ $# -gt 0 ]; then - psql --set ON_ERROR_STOP=1 -A -t -h localhost -q -f "${file}" "$@" + psql --set ON_ERROR_STOP=1 -A -t -h "${db_host}" -q -f "${file}" "$@" retcode=$? else export PGPASSWORD=$db_password - psql --set ON_ERROR_STOP=1 -A -t -h localhost -q -U "${db_user}" -d "${db_name}" -f "${file}" + psql --set ON_ERROR_STOP=1 -A -t -h "${db_host}" -q -U "${db_user}" -d "${db_name}" -f "${file}" retcode=$? fi return $retcode