postgresql-setup: fail earlier during bad $PGDATA dir creation

Related: #972425
Version: 9.2.4-2
This commit is contained in:
Pavel Raiskup 2013-06-11 11:00:56 +02:00
parent 30d053b7a5
commit 63807df6fc
2 changed files with 6 additions and 2 deletions

View File

@ -66,9 +66,9 @@ script_result=0
# code shared between initdb and upgrade actions # code shared between initdb and upgrade actions
perform_initdb(){ perform_initdb(){
if [ ! -e "$PGDATA" -a ! -h "$PGDATA" ] if [ ! -e "$PGDATA" ]
then then
mkdir -p "$PGDATA" || return 1 mkdir "$PGDATA" || return 1
chown postgres:postgres "$PGDATA" chown postgres:postgres "$PGDATA"
chmod go-rwx "$PGDATA" chmod go-rwx "$PGDATA"
fi fi

View File

@ -1103,6 +1103,10 @@ fi
%endif %endif
%changelog %changelog
* Tue Jun 11 2013 Pavel Raiskup <praiskup@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@redhat.com> - 9.2.4-2 * Wed Jun 05 2013 Pavel Raiskup <praiskup@redhat.com> - 9.2.4-2
- fix rpmlint warnings - fix rpmlint warnings
- fix aarch64 build by defining missing atomic operations (#970661) - fix aarch64 build by defining missing atomic operations (#970661)