1 |
commit: 8f36b38642832f500e0bbcb83f0026b365a4d070 |
2 |
Author: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 24 13:46:54 2011 +0000 |
4 |
Commit: Aaron Swenson <titanofold <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 24 13:46:54 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pgsql-patches.git;a=commit;h=8f36b386 |
7 |
|
8 |
Fixed passing environments issue. (Bug 394159) |
9 |
|
10 |
--- |
11 |
postgresql.init | 13 +++++++++---- |
12 |
1 files changed, 9 insertions(+), 4 deletions(-) |
13 |
|
14 |
diff --git a/postgresql.init b/postgresql.init |
15 |
index ed1dea4..363ea1a 100644 |
16 |
--- a/postgresql.init |
17 |
+++ b/postgresql.init |
18 |
@@ -69,7 +69,7 @@ checkconfig() { |
19 |
|
20 |
checkpath -d -m 0770 -o postgres:postgres ${socket_path} |
21 |
if [ -e ${socket_path}/.s.PGSQL.${configured_port} ] ; then |
22 |
- eerror "Socket conflict." |
23 |
+ eerror "Socket conflict." |
24 |
eerror "A server is already listening on:" |
25 |
eerror " ${socket_path}/.s.PGSQL.${configured_port}" |
26 |
eerror "HINT: Change PGPORT to listen on a different socket." |
27 |
@@ -84,16 +84,21 @@ start() { |
28 |
|
29 |
rm -f ${DATA_DIR}/postmaster.pid |
30 |
|
31 |
- local retval |
32 |
+ local extraenv |
33 |
+ local x |
34 |
+ for x in ${PG_EXTRA_ENV} ; do |
35 |
+ extraenv="${extraenv} --env ${x}" |
36 |
+ done |
37 |
|
38 |
start-stop-daemon --start \ |
39 |
--user postgres \ |
40 |
--exec /usr/lib/postgresql-@SLOT@/bin/postgres \ |
41 |
- --env "PGPORT=${configured_port} ${PG_EXTRA_ENV}" \ |
42 |
+ --env "PGPORT=${configured_port}" \ |
43 |
+ ${extraenv} \ |
44 |
--wait $((${START_TIMEOUT}*1000)) \ |
45 |
--pidfile ${DATA_DIR}/postmaster.pid \ |
46 |
-- -D ${PGDATA} --data-directory=${DATA_DIR} --silent-mode=true ${PGOPTS} |
47 |
- retval=$? |
48 |
+ local retval=$? |
49 |
|
50 |
if [ $retval -ne 0 ] ; then |
51 |
eerror "Check the PostgreSQL @SLOT@ log for a detailed explanation of the above error." |