Skip site navigation (1) Skip section navigation (2)

Re: BUG #1093: wrong handling of additional parameters in init script

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: cat(at)dtf(dot)ru
Cc: "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #1093: wrong handling of additional parameters in init script
Date: 2004-03-04 16:55:59
Message-ID: 26856.1078419359@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org> writes:
> Version for PostgreSQL 7.3.x contains some logic based on the name of script
> NAME=`basename $0`
> I assume, it is for support of multiple postmasters using additional files 
> /etc/sysconfig/pgsql/${NAME} 

> But this variable is dependable of whether this script was called by hand 
> from its main location as postgresql (or using RedHat's 'service postgresql 
> start') or from /etc/rc.d/rc (through symlink as S85postgresql) 

The version I'm looking at (7.4) works around that as follows:

# Find the name of the script
NAME=`basename $0`
if [ ${NAME:0:1} = "S" -o ${NAME:0:1} = "K" ]
then
	NAME=${NAME:3}
fi

which is pretty darn ugly but seems like it will serve.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: PostgreSQL Bugs ListDate: 2004-03-04 17:56:42
Subject: BUG #1094: date_part('week') bug
Previous:From: Bruce MomjianDate: 2004-03-04 16:45:35
Subject: Re: BUG #1093: wrong handling of additional parameters in init

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group