Bug 80782

Summary: postgresql init script always returns 0
Product: [Retired] Red Hat Linux Reporter: Greg Pyhl <gregpyhl>
Component: postgresqlAssignee: Tom Lane <tgl>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: hhorak
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-24 04:36:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Greg Pyhl 2002-12-31 09:54:05 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203

Description of problem:
Last line of /etc/rc.d/init.d/postgresql says:

exit 0

This should be changed to

exit $?

in order to get correct exit values when server is running/stopped/dead/etc.
Correct exit value is important for scripts and all other init scripts uses
them, too.

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


How reproducible:
Always

Steps to Reproduce:
1. Start and stop postgresql via init script
2. /etc/init.d/postgresql status
3.
    

Actual Results:  exit value is always 0.

Expected Results:  exit value should depend on server state.

Comment 1 Greg Pyhl 2003-03-04 08:14:34 UTC
So, what's the story here?

Comment 2 Andrew Overholt 2003-03-04 16:45:10 UTC
I am looking into this.

Comment 3 Andrew Overholt 2003-03-12 22:56:28 UTC
Reassigning.

Comment 4 Tom Lane 2005-01-24 04:36:02 UTC
Done in PostgreSQL 8.0 version of init script.