From 027e0bdc7c9964283b0d3afae2469002f0fc9799 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 10:47:18 +0000 Subject: auto-import changelog data from postgresql-7.4.2-1.src.rpm Wed Mar 10 2004 Tom Lane 7.4.2-1 - Update to PostgreSQL 7.4.2; sync with community SRPM as much as possible. - Support PGOPTS from /etc/sysconfig/pgsql, per bug 111504. - Fix permissions on /etc/sysconfig/pgsql, per bug 115278. - SELinux patch in init file: always su - rebuilt Wed Feb 25 2004 Tom Lane - Update to PostgreSQL 7.4.1. - Rebuilt Tue Feb 24 2004 Tom Lane - Fix chown syntax in postgresql.init also. - Rebuilt Mon Feb 23 2004 Tim Waugh - Use ':' instead of '.' as separator for chown. Fri Feb 13 2004 Elliot Lee - rebuilt Fri Jan 09 2004 Lamar Owen - 7.4.1-1PGDG - Merge Sander Steffann's changes up to 7.4-0.5PGDG - Proper 7.4.1 JDBC jars this time. - Patch for no pl/python from Alvaro --- postgresql.init | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'postgresql.init') diff --git a/postgresql.init b/postgresql.init index 08aad37..8b08700 100644 --- a/postgresql.init +++ b/postgresql.init @@ -1,4 +1,4 @@ -#! /bin/sh +#!/bin/sh # postgresql This is the init script for starting up the PostgreSQL # server # @@ -88,6 +88,7 @@ fi [ -f /etc/sysconfig/pgsql/${NAME} ] && . /etc/sysconfig/pgsql/${NAME} export PGDATA export PGPORT +export PGOPTS # Check that networking is up. # Pretty much need it for postmaster. @@ -143,7 +144,7 @@ start(){ if [ ! -d $PGDATA ] then mkdir -p $PGDATA - chown postgres.postgres $PGDATA + chown postgres:postgres $PGDATA chmod go-rwx $PGDATA fi # Make sure the locale from the initdb is preserved for later startups... @@ -153,7 +154,7 @@ start(){ # Is expanded this early to be used in the command su runs echo "export LANG LC_ALL LC_CTYPE LC_COLLATE LC_NUMERIC LC_CTYPE LC_TIME" >> $PGDATA/../initdb.i18n # Initialize the database - su -l postgres -s /bin/sh -c "/usr/bin/initdb --pgdata=$PGDATA > /dev/null 2>&1" < /dev/null + su -l postgres -c "/usr/bin/initdb --pgdata=$PGDATA > /dev/null 2>&1" < /dev/null [ -f $PGDATA/PG_VERSION ] && echo_success [ ! -f $PGDATA/PG_VERSION ] && echo_failure echo @@ -170,7 +171,7 @@ start(){ #all systems go -- remove any stale lock files rm -f /tmp/.s.PGSQL.${PGPORT} > /dev/null echo -n "$PSQL_START" - su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster -o '-p ${PGPORT}' start > /dev/null 2>&1" < /dev/null + su -l postgres -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster -o '-p ${PGPORT} ${PGOPTS}' start > /dev/null 2>&1" < /dev/null sleep 1 pid=`pidof -s /usr/bin/postmaster` if [ $pid ] @@ -188,7 +189,7 @@ start(){ stop(){ echo -n $"Stopping ${NAME} service: " - su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl stop -D $PGDATA -s -m fast" > /dev/null 2>&1 + su -l postgres -c "/usr/bin/pg_ctl stop -D $PGDATA -s -m fast" > /dev/null 2>&1 < /dev/null ret=$? if [ $ret -eq 0 ] then @@ -211,7 +212,7 @@ condrestart(){ } reload(){ - su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl reload -D $PGDATA -s" > /dev/null 2>&1 + su -l postgres -c "/usr/bin/pg_ctl reload -D $PGDATA -s" > /dev/null 2>&1 < /dev/null } # This script is slightly unusual in that the name of the daemon (postmaster) -- cgit