start up and shut down script
I am using PostgreSQL 8.0.0.
i have noted the following lines in the script to start or shut down postmaster.
Can you please let me know why they are needed
if [ "`uname`" = "Linux" ]; then
INITD=/etc/rc.d/init.d
. $INITD/functions
# Get config.
. /etc/sysconfig/network
fi
and
if [ "`uname`" = "Linux" ]; then
[ "${NETWORKING}" = "no" ] && exit 0
fi
who will define $NETWORKING ?
are these calls OS specific , for instance they are for red hat
for a diffrent OS like Enterprise Suse Linux 10 the above script will not work,
because the file $INITD/functions is not there in case of Suse Linux installation
Similarly . /etc/sysconfig/network
is not a file but a directory in Suse Linux 10.
thanks
surabhi
On Fri, Nov 03, 2006 at 01:40:35PM +0530, surabhi.ahuja wrote:
I am using PostgreSQL 8.0.0.
i have noted the following lines in the script to start or shut down postmaster.
Can you please let me know why they are needed
Where did you get these fragments from? They appear to be for a redhat
based system, not sure because I don't have them.
if [ "`uname`" = "Linux" ]; then
INITD=/etc/rc.d/init.d
. $INITD/functions
# Get config.
. /etc/sysconfig/network
fi
Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
Show quoted text
From each according to his ability. To each according to his ability to litigate.
surabhi.ahuja wrote:
I am using PostgreSQL 8.0.0.
i have noted the following lines in the script to start or shut down
postmaster.
Can you please let me know why they are neededif [ "`uname`" = "Linux" ]; then
INITD=/etc/rc.d/init.d
. $INITD/functions
# Get config.
. /etc/sysconfig/network
fi
andif [ "`uname`" = "Linux" ]; then
[ "${NETWORKING}" = "no" ] && exit 0
fiwho will define $NETWORKING ?
are these calls OS specific , for instance they are for red hat
Yes - this looks like a Red Hat script. It's certainly not the one that
ships with the source distribution.
I believe $NETWORKING is defined in $INITD/functions and indicates that
you at runlevel 3 or above (so not in single-user recovery mode or
anything odd like that).
Oh, and you shouldn't be running 8.0.0 - upgrade to 8.0.9 as soon as is
practical. There are many bugfixes between the two versions.
--
Richard Huxton
Archonet Ltd
Richard Huxton <dev@archonet.com> writes:
surabhi.ahuja wrote:
i have noted the following lines in the script to start or shut down
postmaster.
...
Yes - this looks like a Red Hat script. It's certainly not the one that
ships with the source distribution.
It's not the one that ships with Red Hat, either ;-)
If you're running SUSE then the best advice is probably to install
SUSE's postgresql package, which presumably will contain a start script
that works on that distro.
regards, tom lane