mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03:00
More initdb cleanup
This commit is contained in:
parent
24edd34da5
commit
a08eb45c52
@ -27,7 +27,7 @@
|
||||
#
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.71 1999/12/18 02:48:53 momjian Exp $
|
||||
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.72 1999/12/18 02:56:01 momjian Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@ -65,7 +65,8 @@ then
|
||||
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
|
||||
for dir in `echo "$PATH" | sed 's/:/ /g'`
|
||||
do
|
||||
# empty entry in path means current dir
|
||||
[ -z "$dir" ] && dir='.'
|
||||
if [ -f "$dir/$CMDNAME" ]
|
||||
@ -77,7 +78,8 @@ else
|
||||
fi
|
||||
|
||||
# Check if needed programs actually exist in path
|
||||
for prog in postgres pg_version ; do
|
||||
for prog in postgres pg_version
|
||||
do
|
||||
if [ ! -x "$PGPATH/$prog" ]
|
||||
then
|
||||
echo "The program $prog needed by $CMDNAME could not be found. It was"
|
||||
@ -111,11 +113,6 @@ template_only=0
|
||||
# user.
|
||||
POSTGRES_SUPERUSERNAME="$EffectiveUser"
|
||||
|
||||
# Note: The sysid can be freely selected. This will probably confuse matters,
|
||||
# but if your Unix user postgres is uid 48327 you might chose to start
|
||||
# at 0 (or 1) in the database.
|
||||
POSTGRES_SUPERUSERID="$EUID"
|
||||
|
||||
Password='_null_'
|
||||
|
||||
while [ "$#" -gt 0 ]
|
||||
@ -298,7 +295,8 @@ echo
|
||||
|
||||
if [ -z "$PGLIB" ]
|
||||
then
|
||||
for dir in "$PGPATH/../lib" "$PGPATH/../lib/pgsql"; do
|
||||
for dir in "$PGPATH/../lib" "$PGPATH/../lib/pgsql"
|
||||
do
|
||||
if [ -f "$dir/global1.bki.source" ]
|
||||
then
|
||||
PGLIB="$dir"
|
||||
|
Loading…
x
Reference in New Issue
Block a user