Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 80782 - postgresql init script always returns 0
postgresql init script always returns 0
Product: Red Hat Linux
Classification: Retired
Component: postgresql (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tom Lane
Depends On:
  Show dependency treegraph
Reported: 2002-12-31 04:54 EST by Greg Pyhl
Modified: 2013-07-02 22:59 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-01-23 23:36:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Greg Pyhl 2002-12-31 04:54:05 EST
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:

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

Actual Results:  exit value is always 0.

Expected Results:  exit value should depend on server state.
Comment 1 Greg Pyhl 2003-03-04 03:14:34 EST
So, what's the story here?
Comment 2 Andrew Overholt 2003-03-04 11:45:10 EST
I am looking into this.
Comment 3 Andrew Overholt 2003-03-12 17:56:28 EST
Comment 4 Tom Lane 2005-01-23 23:36:02 EST
Done in PostgreSQL 8.0 version of init script.

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