|
27 | 27 | # Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
|
28 | 28 | # Portions Copyright (c) 1994, Regents of the University of California
|
29 | 29 | #
|
30 |
| -# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.200 2003/08/26 15:38:25 tgl Exp $ |
| 30 | +# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.201 2003/09/07 03:36:03 tgl Exp $ |
31 | 31 | #
|
32 | 32 | #-------------------------------------------------------------------------
|
33 | 33 |
|
@@ -76,6 +76,7 @@ CMDNAME=`basename $0`
|
76 | 76 |
|
77 | 77 | # Placed here during build
|
78 | 78 | VERSION='@VERSION@'
|
| 79 | +HAVE_IPV6='@HAVE_IPV6@' |
79 | 80 | bindir='@bindir@'
|
80 | 81 | # Note that "datadir" is not the directory we're initializing, it's
|
81 | 82 | # merely how Autoconf names PREFIX/share.
|
@@ -584,15 +585,21 @@ echo "$nconns"
|
584 | 585 |
|
585 | 586 | $ECHO_N"creating configuration files..."$ECHO_C
|
586 | 587 |
|
587 |
| -cp"$PG_HBA_SAMPLE""$PGDATA"/pg_hba.conf|| exit_nicely |
588 |
| -cp"$PG_IDENT_SAMPLE""$PGDATA"/pg_ident.conf|| exit_nicely |
589 | 588 | sed -e"s/^#shared_buffers = 1000/shared_buffers =$nbuffers/" \
|
590 | 589 | -e"s/^#max_connections = 100/max_connections =$nconns/" \
|
591 | 590 | -e"s/^#lc_messages = 'C'/lc_messages = '`pg_getlocale MESSAGES`'/" \
|
592 | 591 | -e"s/^#lc_monetary = 'C'/lc_monetary = '`pg_getlocale MONETARY`'/" \
|
593 | 592 | -e"s/^#lc_numeric = 'C'/lc_numeric = '`pg_getlocale NUMERIC`'/" \
|
594 | 593 | -e"s/^#lc_time = 'C'/lc_time = '`pg_getlocale TIME`'/" \
|
595 | 594 | "$POSTGRESQL_CONF_SAMPLE">"$PGDATA"/postgresql.conf|| exit_nicely
|
| 595 | +if ["x$HAVE_IPV6"= xyes ] |
| 596 | +then |
| 597 | + cp"$PG_HBA_SAMPLE""$PGDATA"/pg_hba.conf|| exit_nicely |
| 598 | +else |
| 599 | + sed -e"/ ::1 / s/^host/#host/" \ |
| 600 | +"$PG_HBA_SAMPLE">"$PGDATA"/pg_hba.conf|| exit_nicely |
| 601 | +fi |
| 602 | +cp"$PG_IDENT_SAMPLE""$PGDATA"/pg_ident.conf|| exit_nicely |
596 | 603 |
|
597 | 604 | chmod 0600"$PGDATA"/pg_hba.conf"$PGDATA"/pg_ident.conf \
|
598 | 605 | "$PGDATA"/postgresql.conf
|
|