11
0

[info=cbb0aece97fc13b1d48d096c5c5c85f8]

OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-12-image?expand=0&rev=4
This commit is contained in:
2022-11-23 09:33:14 +00:00
committed by Git OBS Bridge
parent c24f969898
commit 6b251b8ea4
5 changed files with 23 additions and 17 deletions

View File

@@ -45,7 +45,7 @@ docker_create_db_directories() {
chmod 775 /var/run/postgresql || :
# Create the transaction log directory before initdb is run so the directory is owned by the correct user
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
if [ -n "${POSTGRES_INITDB_WALDIR:-}" ]; then
mkdir -p "$POSTGRES_INITDB_WALDIR"
if [ "$user" = '0' ]; then
find "$POSTGRES_INITDB_WALDIR" \! -user postgres -exec chown postgres '{}' +
@@ -84,7 +84,7 @@ docker_init_database_dir() {
done
fi
if [ -n "$POSTGRES_INITDB_WALDIR" ]; then
if [ -n "${POSTGRES_INITDB_WALDIR:-}" ]; then
set -- --waldir "$POSTGRES_INITDB_WALDIR" "$@"
fi
@@ -172,10 +172,11 @@ docker_process_init_files() {
. "$f"
fi
;;
*.sql) echo "$0: running $f"; docker_process_sql -f "$f"; echo ;;
*.sql.gz) echo "$0: running $f"; gunzip -c "$f" | docker_process_sql; echo ;;
*.sql.xz) echo "$0: running $f"; xzcat "$f" | docker_process_sql; echo ;;
*) echo "$0: ignoring $f" ;;
*.sql) echo "$0: running $f"; docker_process_sql -f "$f"; echo ;;
*.sql.gz) echo "$0: running $f"; gunzip -c "$f" | docker_process_sql; echo ;;
*.sql.xz) echo "$0: running $f"; xzcat "$f" | docker_process_sql; echo ;;
*.sql.zst) echo "$0: running $f"; zstd -dc "$f" | docker_process_sql; echo ;;
*) echo "$0: ignoring $f" ;;
esac
echo
done
@@ -240,10 +241,6 @@ pg_setup_hba_conf() {
local auth
# check the default/configured encryption and use that as the auth method
auth="$(postgres -C password_encryption "$@")"
# postgres 9 only reports "on" and not "md5"
if [ "$auth" = 'on' ]; then
auth='md5'
fi
: "${POSTGRES_HOST_AUTH_METHOD:=$auth}"
{
echo