From db90bb8627ebce54b3f7c1a4532a0b02e13eec91 Mon Sep 17 00:00:00 2001 From: Mark Hymers Date: Sun, 4 Jul 2010 16:45:04 +0000 Subject: [PATCH] We really don't want environment variables to cause us to drop the wrong damn database Signed-off-by: Mark Hymers --- config/debian/dinstall.functions | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index 34664c7d..fc6ad473 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -53,11 +53,21 @@ function pgdump_post() { # Load the dak-dev projectb function pgdakdev() { + # Make sure to unset any possible psql variables so we don't drop the wrong + # f****** database by accident + local PGDATABASE + unset PGDATABASE + local PGHOST + unset PGHOST + local PGPORT + unset PGPORT + local PGUSER + unset PGUSER cd $base/backup - echo "drop database projectb" | psql -p 5433 template1 + echo "drop database projectb" | psql -p 5434 template1 #cat currentall | psql -p 5433 template1 - createdb -p 5433 -T template1 projectb - fgrep -v '\connect' current | psql -p 5433 projectb + createdb -p 5434 -T template1 projectb + fgrep -v '\connect' current | psql -p 5434 projectb } # Updating various files -- 2.39.2