From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Larry Rosenman <ler(at)lerctr(dot)org>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Idea: cross-check versions during initdb |
Date: | 2000-10-27 22:31:38 |
Message-ID: | Pine.LNX.4.21.0010280027130.838-100000@peter.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane writes:
> But it's still dependent on the user's PATH to point to the right
> executables, no?
This is what's puzzling me. There's code in there that tries to locate
initdb and uses the executables and bki files (7.0 only) from the same
tree. Evidently this code does not always work right, but that's what
needs to be fixed.
CMDNAME=`basename $0`
...
#
# Find out where we're located
#
if echo "$0" | grep '/' > /dev/null 2>&1
then
# explicit dir name given
PGPATH=`echo $0 | sed 's,/[^/]*$,,'` # (dirname command is not portable)
else
# look for it in PATH ('which' command is not portable)
for dir in `echo "$PATH" | sed 's/:/ /g'`
do
# empty entry in path means current dir
[ -z "$dir" ] && dir='.'
if [ -f "$dir/$CMDNAME" ]
then
PGPATH="$dir"
break
fi
done
fi
--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/
From | Date | Subject | |
---|---|---|---|
Next Message | Lamar Owen | 2000-10-27 22:33:49 | Re: [HACKERS] Re:RPM dependencies (Was: 7.0 vs. 7.1 (was: latest version?)) |
Previous Message | Tom Lane | 2000-10-27 22:29:56 | Re: Summary: what to do about INET/CIDR |