From a884bda9879e83d55764818ca172b5d8486f3849 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 11 Jan 2005 20:20:45 +0000 Subject: - Add restorecon to postgresql.init in order to restore database to correct - SELinux context. --- postgresql.init | 2 ++ 1 file changed, 2 insertions(+) (limited to 'postgresql.init') 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 -- cgit