- boo#1122892: Add a sysconfig variable for initdb.
OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql?expand=0&rev=150
This commit is contained in:
parent
3d54e65b53
commit
10c6062196
@ -5,6 +5,7 @@ test -f $PG_SYSCONFIG && . $PG_SYSCONFIG
|
||||
|
||||
eval DATADIR=${POSTGRES_DATADIR:-~postgres/data}
|
||||
OPTIONS=${POSTGRES_OPTIONS}
|
||||
INITDB_OPTS=${POSTGRES_INITDB_OPTS}
|
||||
PIDFILE=$DATADIR/postmaster.pid
|
||||
|
||||
#
|
||||
@ -48,8 +49,8 @@ case "$1" in
|
||||
if [ ! -f $DATADIR/PG_VERSION ]; then
|
||||
test -n "$POSTGRES_LANG" && export LC_ALL="$POSTGRES_LANG"
|
||||
install -d -m 700 ${DATADIR} &&
|
||||
echo "Initializing PostgreSQL $VERSION at location ${DATADIR}"
|
||||
/usr/bin/initdb --auth=ident $DATADIR > initlog 2>&1 || {
|
||||
echo "Initializing PostgreSQL $VERSION at location ${DATADIR} using options \"$INITDB_OPTS\""
|
||||
/usr/bin/initdb $INITDB_OPTS $DATADIR > initlog 2>&1 || {
|
||||
echo "Initialisation failed. See $PWD/initlog ."
|
||||
exit 1
|
||||
}
|
||||
|
@ -49,3 +49,19 @@ POSTGRES_TIMEOUT="600"
|
||||
# If unset or empty $RC_LANG from /etc/sysconfig/language is used.
|
||||
#
|
||||
POSTGRES_LANG=""
|
||||
|
||||
## Path: Applications/PostgreSQL
|
||||
## Description: The PostgreSQL Database System
|
||||
## Type: string()
|
||||
## Default: "--auth=ident"
|
||||
## ServiceRestart: ""
|
||||
#
|
||||
# When PostgreSQL gets started while no database cluster exists under
|
||||
# the directory stored in the POSTGRES_DATADIR variable, the initdb
|
||||
# tool gets called with that directory to initialize a new cluster.
|
||||
# Additional options can be passed to initdb via this variable.
|
||||
# Alternatively initdb can be called manually to initialize the
|
||||
# database cluster prior to starting the PostgreSQL server for the
|
||||
# first time.
|
||||
#
|
||||
POSTGRES_INITDB_OPTS="--auth=ident"
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 23 11:45:10 UTC 2023 - Reinhard Max <max@suse.com>
|
||||
|
||||
- boo#1122892: Add a sysconfig variable for initdb.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 15 14:17:11 UTC 2023 - Reinhard Max <max@suse.com>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user