diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2000-11-02 19:48:39 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2000-11-02 19:48:39 +0000 |
commit | 26c825e4b0bc19e071a1fd598f6513980c507fdf (patch) | |
tree | 51f932e4dab58a186d3248c9657d24a3647c80da | |
parent | bc9b199c2638f2f1e062488b8d74cfb91181fe97 (diff) | |
download | postgresql-26c825e4b0bc19e071a1fd598f6513980c507fdf.tar.gz postgresql-26c825e4b0bc19e071a1fd598f6513980c507fdf.zip |
Allow initdb to handle relative paths for PGDATA, by converting them to
absolute before starting a backend.
-rw-r--r-- | src/bin/initdb/initdb.sh | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/bin/initdb/initdb.sh b/src/bin/initdb/initdb.sh index b7b5ec5dbfe..9369107b819 100644 --- a/src/bin/initdb/initdb.sh +++ b/src/bin/initdb/initdb.sh @@ -23,7 +23,7 @@ # # Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.108 2000/10/29 11:36:44 petere Exp $ +# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.109 2000/11/02 19:48:39 petere Exp $ # #------------------------------------------------------------------------- @@ -321,16 +321,6 @@ then exit 1 fi -# The data path must be absolute, because the backend doesn't like -# '.' and '..' stuff. (Should perhaps be fixed there.) - -echo "$PGDATA" | grep '^/' > /dev/null 2>&1 -if [ "$?" -ne 0 ] -then - echo "$CMDNAME: data path must be specified as an absolute path" - exit 1 -fi - #------------------------------------------------------------------------- # Find the input files @@ -434,6 +424,11 @@ else fi fi +# Be sure that PGDATA is an absolute path, otherwise backend croaks. + +unset CDPATH +PGDATA=`cd $PGDATA && pwd` + ########################################################################## # |