[csw-devel] SF.net SVN: gar:[16371] csw/mgar/pkg/postgresql/branches/postgresql-8. 3-raos/files/cswpostgresql.tmpl
guengel at users.sourceforge.net
guengel at users.sourceforge.net
Sun Dec 4 21:35:50 CET 2011
Revision: 16371
http://gar.svn.sourceforge.net/gar/?rev=16371&view=rev
Author: guengel
Date: 2011-12-04 20:35:49 +0000 (Sun, 04 Dec 2011)
Log Message:
-----------
postgresql/branches/postgresql-8.3-raos: Put SERVEROPTS at the end of pgctl call. Add -o only to SERVEROPTS if not already present.
Modified Paths:
--------------
csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/files/cswpostgresql.tmpl
Modified: csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/files/cswpostgresql.tmpl
===================================================================
--- csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/files/cswpostgresql.tmpl 2011-12-04 20:15:42 UTC (rev 16370)
+++ csw/mgar/pkg/postgresql/branches/postgresql-8.3-raos/files/cswpostgresql.tmpl 2011-12-04 20:35:49 UTC (rev 16371)
@@ -28,7 +28,15 @@
[ -z "${PGDATA}" ] && PGDATA=@PGDATA@
[ -z "${PGDATA}" ] && SHUTDOWNMODE=fast
-[ -n "${SERVEROPTS}" ] && SERVEROPTS="-o ${SERVEROPTS}"
+if [ -n "${SERVEROPTS}" ]
+then
+ # Make sure, SERVEROPTS start with -o
+ echo "${SERVEROPTS}" | grep '^-o' >/dev/null 2>&1
+ if [ $? -ne 0 ]
+ then
+ SERVEROPTS="-o ${SERVEROPTS}"
+ fi
+fi
# Exit if postgres user hasn't been created.
@@ -51,7 +59,7 @@
if [ -d ${PGDATA} -a `ls -l ${PGDATA} 2> /dev/null | wc -l` -gt 1 ]; then
# PostgreSQL data directory exists and is populated
echo "Starting PostgreSQL..."
- su postgres -c "${PGCTL} start -D ${PGDATA} -l ${PGDATA}/postgresql.log "${SERVEROPTS}""
+ su postgres -c "${PGCTL} start -D ${PGDATA} -l ${PGDATA}/postgresql.log ${SERVEROPTS}"
fi
;;
@@ -63,7 +71,7 @@
restart)
echo "Restarting PostgreSQL database..."
- su postgres -c "${PGCTL} restart -D ${PGDATA} -l ${PGDATA}/postgresql.log "${SERVEROPTS}" -m ${SHUTDOWNMODE}"
+ su postgres -c "${PGCTL} restart -D ${PGDATA} -l ${PGDATA}/postgresql.log -m ${SHUTDOWNMODE} ${SERVEROPTS}"
;;
reload)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list