Bug 101927 - Startup scripts read different configuration files on startup and shutdown
Startup scripts read different configuration files on startup and shutdown
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: postgresql (Show other bugs)
9
All Linux
medium Severity high
: ---
: ---
Assigned To: Fernando Nasser
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-08-08 04:54 EDT by Henning Schmiedehausen
Modified: 2007-04-18 12:56 EDT (History)
0 users

See Also:
Fixed In Version: 7.3.4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-02-23 16:45:50 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Henning Schmiedehausen 2003-08-08 04:54:09 EDT
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 09:01:54 EDT
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.