summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@fedoraproject.org>2005-01-11 20:20:45 +0000
committerDaniel J Walsh <dwalsh@fedoraproject.org>2005-01-11 20:20:45 +0000
commita884bda9879e83d55764818ca172b5d8486f3849 (patch)
treee08f91c4946b20c9103af6f33b8cbe1534cb295c
parentec364abd8ac0e5afdc6dc6c9fa3e56e79c1585f7 (diff)
downloadpostgresql-setup-a884bda9879e83d55764818ca172b5d8486f3849.tar.gz
postgresql-setup-a884bda9879e83d55764818ca172b5d8486f3849.tar.xz
postgresql-setup-a884bda9879e83d55764818ca172b5d8486f3849.zip
- Add restorecon to postgresql.init in order to restore database to correctpostgresql-7_4_6-4
- SELinux context.
-rw-r--r--postgresql.init2
-rwxr-xr-xpostgresql.spec6
2 files changed, 7 insertions, 1 deletions
diff --git a/postgresql.init b/postgresql.init
index 9f41e9e..fc98742 100644
--- a/postgresql.init
+++ b/postgresql.init
@@ -94,6 +94,7 @@ fi
# Set defaults for configuration variables
PGENGINE=/usr/bin
PGPORT=5432
+export PGDATADIR=/var/lib/pgsql
export PGDATA=/var/lib/pgsql
if [ -f $PGDATA/PG_VERSION ] && [ -d $PGDATA/base/template1 ]
then
@@ -165,6 +166,7 @@ start(){
mkdir -p $PGDATA || exit 1
chown postgres:postgres $PGDATA
chmod go-rwx $PGDATA
+ [ -x /sbin/restorecon ] && restorecon $PGDATADIR
fi
# Make sure the locale from the initdb is preserved for later startups...
[ -f /etc/sysconfig/i18n ] && cp /etc/sysconfig/i18n $PGDATA/../initdb.i18n
diff --git a/postgresql.spec b/postgresql.spec
index 976aaad..ba9be8b 100755
--- a/postgresql.spec
+++ b/postgresql.spec
@@ -67,7 +67,7 @@ Version: 7.4.6
# Pre-release RPM's should not be put up on the public ftp.postgresql.org server
# -- only test releases or full releases should be.
-Release: 3
+Release: 4
License: BSD
Group: Applications/Databases
Source0: ftp://ftp.postgresql.org/pub/source/v%{version}/postgresql-%{version}.tar.bz2
@@ -790,6 +790,10 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
+* Tue Jan 11 2005 Dan Walsh <dwalsh@redhat.com> 7.4.6-4
+- Add restorecon to postgresql.init in order to restore database to correct
+- SELinux context.
+
* Thu Dec 16 2004 Tom Lane <tgl@redhat.com> 7.4.6-3
- Update to PyGreSQL 3.6 (to fix bug #142711)
- Adjust a few file permissions (bug #142431)