Lines 1-7
Link Here
|
1 |
#!/sbin/runscript |
1 |
#!/sbin/runscript |
2 |
# Copyright 1999-2009 Gentoo Foundation |
2 |
# Copyright 1999-2010 Gentoo Foundation |
3 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# Distributed under the terms of the GNU General Public License v2 |
4 |
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/files/postgresql.init-8.4,v 1.4 2010/01/26 22:01:21 patrick Exp $ |
4 |
# $Header: $ |
5 |
|
5 |
|
6 |
opts="${opts} reload" |
6 |
opts="${opts} reload" |
7 |
|
7 |
|
Lines 32-43
Link Here
|
32 |
fi |
32 |
fi |
33 |
|
33 |
|
34 |
local retval |
34 |
local retval |
|
|
35 |
local errmsg |
35 |
|
36 |
|
36 |
su -l ${PGUSER} \ |
37 |
errmsg=$(su -l ${PGUSER} \ |
37 |
-c "env PGDATA=\"${PGDATA}\" ${PG_EXTRA_ENV} /usr/lib/postgresql-8.4/bin/pg_ctl start ${WAIT_FOR_START} \ |
38 |
-c "env PGDATA=\"${PGDATA}\" ${PG_EXTRA_ENV} /usr/lib/postgresql-8.4/bin/pg_ctl start ${WAIT_FOR_START} \ |
38 |
-o '--silent-mode=true ${PGOPTS}'" |
39 |
-o '-d 1 ${PGOPTS}' 1>/dev/null") |
39 |
retval=$? |
40 |
retval=$? |
40 |
[ $retval -ne 0 ] && eend $retval && return $retval |
41 |
|
|
|
42 |
if [ $retval -ne 0 ] ; then |
43 |
eend $retval $errmsg |
44 |
return $retval |
45 |
fi |
41 |
|
46 |
|
42 |
# The following is to catch the case of an already running server |
47 |
# The following is to catch the case of an already running server |
43 |
# in which pg_ctl doesn't know to which server it connected to and false reports the server as 'up' |
48 |
# in which pg_ctl doesn't know to which server it connected to and false reports the server as 'up' |