DB_LOCALE config parameter renamed to PG_LOCALE

This commit is contained in:
Sameer Naik
2015-11-27 14:47:04 +05:30
parent 5e09110558
commit ce2caf3937
4 changed files with 9 additions and 6 deletions
+3 -1
View File
@@ -2,6 +2,9 @@
PG_SSL=${PG_SSL:-}
PG_LOCALE=${PG_LOCALE:-$DB_LOCALE} # backward compatibility
PG_LOCALE=${PG_LOCALE:-C}
PG_TRUST_LOCALNET=${PG_TRUST_LOCALNET:-$PSQL_TRUST_LOCALNET} # backward compatibility
PG_TRUST_LOCALNET=${PG_TRUST_LOCALNET:-false}
@@ -17,5 +20,4 @@ DB_NAME=${DB_NAME:-}
DB_USER=${DB_USER:-}
DB_PASS=${DB_PASS:-}
DB_LOCALE=${DB_LOCALE:-C}
DB_UNACCENT=${DB_UNACCENT:-false}
+4 -4
View File
@@ -25,9 +25,9 @@ map_uidgid() {
}
locale_gen() {
if [[ $DB_LOCALE != C ]]; then
echo "Generating locale \"${DB_LOCALE}\"..."
locale-gen ${DB_LOCALE} >/dev/null
if [[ $PG_LOCALE != C ]]; then
echo "Generating locale \"${PG_LOCALE}\"..."
locale-gen ${PG_LOCALE} >/dev/null
fi
}
@@ -203,7 +203,7 @@ initialize_database() {
fi
exec_as_postgres ${PG_BINDIR}/initdb --pgdata=${PG_DATADIR} \
--username=${PG_USER} --encoding=unicode --locale=${DB_LOCALE} --auth=trust >/dev/null
--username=${PG_USER} --encoding=unicode --locale=${PG_LOCALE} --auth=trust >/dev/null
if [[ -n ${PG_OLD_VERSION} ]]; then
PG_OLD_BINDIR=/usr/lib/postgresql/${PG_OLD_VERSION}/bin