summaryrefslogtreecommitdiff
path: root/dev-db/postgresql/postgresql-12.7.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db/postgresql/postgresql-12.7.ebuild')
-rw-r--r--dev-db/postgresql/postgresql-12.7.ebuild2
1 files changed, 1 insertions, 1 deletions
diff --git a/dev-db/postgresql/postgresql-12.7.ebuild b/dev-db/postgresql/postgresql-12.7.ebuild
index c6cea755c817..82e066d4d05b 100644
--- a/dev-db/postgresql/postgresql-12.7.ebuild
+++ b/dev-db/postgresql/postgresql-12.7.ebuild
@@ -388,7 +388,7 @@ pkg_config() {
einfo "Initializing the database ..."
if [[ ${EUID} == 0 ]] ; then
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
+ su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
else
"${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
fi