[postgresql] postgresql-setup: fail earlier during bad $PGDATA dir creation
Pavel Raiskup
praiskup at fedoraproject.org
Tue Jun 11 10:06:09 UTC 2013
commit 63807df6fc123b438309869ea63cc2311658e49c
Author: Pavel Raiskup <praiskup at redhat.com>
Date: Tue Jun 11 11:00:56 2013 +0200
postgresql-setup: fail earlier during bad $PGDATA dir creation
Related: #972425
Version: 9.2.4-2
postgresql-setup | 4 ++--
postgresql.spec | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/postgresql-setup b/postgresql-setup
index e566106..a755e11 100644
--- a/postgresql-setup
+++ b/postgresql-setup
@@ -66,9 +66,9 @@ script_result=0
# code shared between initdb and upgrade actions
perform_initdb(){
- if [ ! -e "$PGDATA" -a ! -h "$PGDATA" ]
+ if [ ! -e "$PGDATA" ]
then
- mkdir -p "$PGDATA" || return 1
+ mkdir "$PGDATA" || return 1
chown postgres:postgres "$PGDATA"
chmod go-rwx "$PGDATA"
fi
diff --git a/postgresql.spec b/postgresql.spec
index ea6b2ab..a4de426 100644
--- a/postgresql.spec
+++ b/postgresql.spec
@@ -1103,6 +1103,10 @@ fi
%endif
%changelog
+* Tue Jun 11 2013 Pavel Raiskup <praiskup at redhat.com> - 9.2.4-2
+- postgresql-setup: don't create whole path to server's data to make sure that
+ the parent directory has correct permissions (#972425)
+
* Wed Jun 05 2013 Pavel Raiskup <praiskup at redhat.com> - 9.2.4-2
- fix rpmlint warnings
- fix aarch64 build by defining missing atomic operations (#970661)
More information about the scm-commits
mailing list