Commit 8231a7ab authored by Tatsuo Ishii's avatar Tatsuo Ishii

Fix minor bugs

parent 5b912b08
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.1 1999/12/06 07:23:41 ishii Exp $ # $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.2 1999/12/06 08:35:34 ishii Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
CMDNAME=`basename $0` CMDNAME=`basename $0`
...@@ -131,6 +131,8 @@ if [ $op = "stop" -o $op = "restart" ];then ...@@ -131,6 +131,8 @@ if [ $op = "stop" -o $op = "restart" ];then
echo "done." echo "done."
fi fi
echo "postmaster successfully shut down."
else else
echo "$CMDNAME: Can't find $PIDFILE." echo "$CMDNAME: Can't find $PIDFILE."
echo "Is postmaster running?" echo "Is postmaster running?"
...@@ -148,12 +150,19 @@ if [ $op = "start" -o $op = "restart" ];then ...@@ -148,12 +150,19 @@ if [ $op = "start" -o $op = "restart" ];then
pid=`cat $PIDFILE` pid=`cat $PIDFILE`
fi fi
# no -o given
if [ -z "$POSTOPTS" ];then if [ -z "$POSTOPTS" ];then
if [ -f $DEFPOSTOPTS ];then if [ $op = "start" ];then
eval `cat $DEFPOSTOPTS` & # if we are in start mode, then look postmaster.opts.default
if [ -f $DEFPOSTOPTS ];then
eval `cat $DEFPOSTOPTS` &
else
echo "$CMDNAME: Can't find $DEFPOSTOPTS"
exit 1
fi
else else
echo "$CMDNAME: Can't find $DEFPOSTOPTS" # if we are in restart mode, then look postmaster.opts
exit 1 eval `cat $POSTOPTSFILE` &
fi fi
else else
$po_path $POSTOPTS & $po_path $POSTOPTS &
...@@ -186,6 +195,8 @@ if [ $op = "start" -o $op = "restart" ];then ...@@ -186,6 +195,8 @@ if [ $op = "start" -o $op = "restart" ];then
done done
echo "done." echo "done."
fi fi
echo "postmaster successfully started up."
fi fi
exit 0 exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment