Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit86ab9a5

Browse files
author
Bryan Henderson
committed
Fix bug: No -D option to postgres
1 parente67cc8a commit86ab9a5

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

‎src/bin/initdb/initdb.sh

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#
2727
#
2828
# IDENTIFICATION
29-
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.13 1996/11/14 10:25:33 bryanh Exp $
29+
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.14 1996/11/22 04:33:34 bryanh Exp $
3030
#
3131
#-------------------------------------------------------------------------
3232

@@ -45,7 +45,7 @@ CMDNAME=`basename $0`
4545
# files that are part of Postgres). The user-written program postconfig
4646
# outputs variable settings like "PGLIB=/usr/lib/whatever". If it doesn't
4747
# output a PGLIB value, then there is no default and the user must
48-
# specify the pglib option. Postconfig may not exist, in which case
48+
# specify the pglib option. Postconfig mayvalidlynot exist, in which case
4949
# our invocation of it silently fails.
5050

5151
# The x=x below is to satisfy export if postconfig returns nothing.
@@ -119,16 +119,6 @@ do
119119
shift
120120
done
121121

122-
if ["$debug"-eq 1 ];then
123-
BACKENDARGS="-boot -C -F -d"
124-
else
125-
BACKENDARGS="-boot -C -F -Q"
126-
fi
127-
128-
TEMPLATE=$PGLIB/local1_template1.bki.source
129-
GLOBAL=$PGLIB/global1.bki.source
130-
PG_HBA_SAMPLE=$PGLIB/pg_hba.conf.sample
131-
132122
#-------------------------------------------------------------------------
133123
# Make sure he told us where to find the Postgres files.
134124
#-------------------------------------------------------------------------
@@ -154,6 +144,11 @@ if [ -z $PGDATA ]; then
154144
exit 20
155145
fi
156146

147+
TEMPLATE=$PGLIB/local1_template1.bki.source
148+
GLOBAL=$PGLIB/global1.bki.source
149+
PG_HBA_SAMPLE=$PGLIB/pg_hba.conf.sample
150+
151+
157152
#-------------------------------------------------------------------------
158153
# Find the input files
159154
#-------------------------------------------------------------------------
@@ -249,6 +244,14 @@ fi
249244
rm -rf$PGDATA/base/template1
250245
mkdir$PGDATA/base/template1
251246

247+
if ["$debug"-eq 1 ];then
248+
BACKEND_TALK_ARG="-d"
249+
else
250+
BACKEND_TALK_ARG="-Q"
251+
fi
252+
253+
BACKENDARGS="-boot -C -F -D$PGDATA$BACKEND_TALK_ARG"
254+
252255
echo"$CMDNAME: creating template database in$PGDATA/base/template1"
253256
echo"Running: postgres$BACKENDARGS template1"
254257

@@ -336,5 +339,5 @@ echo
336339
if [$debug-eq 0 ];then
337340
echo"vacuuming template1"
338341

339-
echo"vacuum"| postgres -F -Q template1> /dev/null
342+
echo"vacuum"| postgres -F -Q-D$PGDATAtemplate1> /dev/null
340343
fi

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp