From 5707e60ca3fadb4b5ba1f35dccbb22a0c524ed8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 28 Jul 2015 11:12:41 +0200 Subject: Change password authentication method to database .pgpass file has to be allowed in configuration. Using environment variable is more platform independent. --- Makefile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 77f0809..e08f4d2 100644 --- a/Makefile +++ b/Makefile @@ -50,9 +50,7 @@ initialize: all initdb: initialize_database initialize_database: - echo "$(CONF_DB_HOST):$(CONF_DB_PORT):$(CONF_DB_DATABASE):$(CONF_DB_USER):$(CONF_DB_PASSWORD)" > .pgpass - psql -d "$(CONF_DB_DATABASE)" -h "$(CONF_DB_HOST)" -p "$(CONF_DB_PORT)" -f scripts/databaseinit.sql - $(RM) .pgpass + PGPASSWORD="$(CONF_DB_PASSWORD)" psql -d "$(CONF_DB_DATABASE)" -h "$(CONF_DB_HOST)" -p "$(CONF_DB_PORT)" -f scripts/databaseinit.sql test: parse_kconfig scripts/test.py @@ -79,9 +77,7 @@ clean_measure: cleandb cleandb: clean_database clean_database: - echo "$(CONF_DB_HOST):$(CONF_DB_PORT):$(CONF_DB_DATABASE):$(CONF_DB_USER):$(CONF_DB_PASSWORD)" > .pgpass - psql -d "$(CONF_DB_DATABASE)" -h "$(CONF_DB_HOST)" -p "$(CONF_DB_PORT)" -f scripts/databaseclean.sql - rm -f .pgpass + PGPASSWORD="$(CONF_DB_PASSWORD)" psql -d "$(CONF_DB_DATABASE)" -h "$(CONF_DB_HOST)" -p "$(CONF_DB_PORT)" -f scripts/databaseclean.sql distclean: clean distclean_linux distclean_buildroot clean_measure -- cgit v1.2.3