|
@@ -56,9 +56,12 @@
|
|
# Version 8.1 HOTTA Michihide <hotta@net-newbie.com>
|
|
# Version 8.1 HOTTA Michihide <hotta@net-newbie.com>
|
|
# Version 8.2 Shu KONNO <owa@bg.wakwak.com>
|
|
# Version 8.2 Shu KONNO <owa@bg.wakwak.com>
|
|
|
|
|
|
|
|
+# Version 9.0 IWAI, Masaharu <iwaim.sub@gmail.com>
|
|
|
|
+# fix su(1) paramaters in start() and stop().
|
|
|
|
+
|
|
# PGVERSION must be replaced real version
|
|
# PGVERSION must be replaced real version
|
|
# In vine new postgresql.spec, version must be replaced by building
|
|
# In vine new postgresql.spec, version must be replaced by building
|
|
-PGVERSION=8.4
|
|
+PGVERSION=9.0
|
|
|
|
|
|
# Source function library.
|
|
# Source function library.
|
|
INITD=/etc/rc.d/init.d
|
|
INITD=/etc/rc.d/init.d
|
|
@@ -172,7 +175,7 @@ start(){
|
|
#all systems go -- remove any stale lock files
|
|
#all systems go -- remove any stale lock files
|
|
rm -f /tmp/.s.PGSQL.${PGPORT} > /dev/null
|
|
rm -f /tmp/.s.PGSQL.${PGPORT} > /dev/null
|
|
echo -n "$PSQL_START"
|
|
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 -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster -o '-p ${PGPORT}' start > /dev/null 2>&1" postgres < /dev/null
|
|
sleep 1
|
|
sleep 1
|
|
pid=`pidof -s /usr/bin/postmaster`
|
|
pid=`pidof -s /usr/bin/postmaster`
|
|
if [ $pid ]
|
|
if [ $pid ]
|
|
@@ -200,7 +203,7 @@ start(){
|
|
|
|
|
|
stop(){
|
|
stop(){
|
|
echo -n $"Stopping ${NAME} service: "
|
|
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 -s /bin/sh -c "/usr/bin/pg_ctl stop -D $PGDATA -s -m fast" postgres > /dev/null 2>&1
|
|
ret=$?
|
|
ret=$?
|
|
if [ $ret -eq 0 ]
|
|
if [ $ret -eq 0 ]
|
|
then
|
|
then
|