Bug 101927 - Startup scripts read different configuration files on startup and shutdown
Summary: Startup scripts read different configuration files on startup and shutdown
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: postgresql
Version: 9
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Fernando Nasser
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-08-08 08:54 UTC by Henning Schmiedehausen
Modified: 2007-04-18 16:56 UTC (History)
0 users

Fixed In Version: 7.3.4
Clone Of:
Environment:
Last Closed: 2004-02-23 21:45:50 UTC
Embargoed:


Attachments (Terms of Use)

Description Henning Schmiedehausen 2003-08-08 08:54:09 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030708

Description of problem:
The startup script for postgresql does the following unfortunate
(stupid) thing:

# Find the name of the script
NAME=`basename $0`
[...]
# Override defaults from /etc/sysconfig/pgsql if file is present
[ -f /etc/sysconfig/pgsql/${NAME} ] && . /etc/sysconfig/pgsql/${NAME}


Which means that restarting my database engine with

/sbin/service postgresql restart

reads /etc/sysconfig/pgsql/postgresql 

Regular Startup on boot reads /etc/sysconfig/pgsql/S85postgresql

and shutdown of the same engine (!) reads /etc/sysconfig/pgsql/K15postgresql

as configuration files for the postgresql engine.

This is ridiculous. Whoever wrote that script should be shot. This
might work under BSD where you always reference the script by the
same name but blindly copying into a SysV startup structure where
files are symlinked will not and can not work.


Version-Release number of selected component (if applicable):
7.3.2-3

How reproducible:
Always

Steps to Reproduce:
1. Run sh -x /etc/init.d/postgresql start / stop
2. Run sh -x /etc/rc2.d/S85postgresql start
3. Run sh -x /etc/rc6.d/K15postgresql stop

compare the results. Have an /etc/sysconfig/pgsql/postgresql config
file and try again.
    

Actual Results:  
Database does not start on boot up. Database does not start correctly.
Database does not shut down on shutdown. Database gets corrupted.


Expected Results:  
Every official way to startup / shutdown the database should use the
same configuration files.

Additional info:

Comment 1 Andrew Overholt 2003-08-28 13:01:54 UTC
The init script is in the process of being overhauled.  This bug will be closed
when that work is completed.


Note You need to log in before you can comment on or make changes to this bug.