Bug 71027 - postgresql init script doesn't call success()
postgresql init script doesn't call success()
Status: CLOSED RAWHIDE
Product: Red Hat Public Beta
Classification: Retired
Component: postgresql (Show other bugs)
limbo
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-08-07 18:18 EDT by Jay Berkenbilt
Modified: 2007-04-18 12:45 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-08-07 18:18:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to illustrate source of problem; not necessarily correct fix (621 bytes, patch)
2002-08-07 18:18 EDT, Jay Berkenbilt
no flags Details | Diff

  None (edit)
Description Jay Berkenbilt 2002-08-07 18:18:09 EDT
Description of Problem:

In some cases, init.d/postgresql fails to call echo_success and instead just
echoes " [ OK ]".  There is code in the init script that tries to call success()
if declared.  For reasons I haven't determined, this isn't working.

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

postgresql-server-7.2.1-14

How Reproducible:

always, at least for me

Steps to Reproduce:
1. /etc/rc.d/init.d/postgresql start

Actual Results:

Starting postgresql service:   [ OK ]


Expected Results:

[ OK ] should be to the right and the OK should be green

Additional Information:
	
Only start has this problem.  stop works correctly.  stop calls echo_success()
or echo_failure() unconditionally.

I'm attaching a patch that illustrates that the problem in the start code lies
with the check for whether success is declared.  I'm not claiming that my fix
(which simply eliminates the check) is right, but it is no more wrong than what
is happening in the stop code.  In any case, my primary purpose for posting the
patch is to illustrate where the problem is.  The "Right" fix would be to fix
the test for whether success() is declared, but I'm not an advanced enough bash
user to see the problem off the top of my head, and I don't have time to track
it down right now....
Comment 1 Jay Berkenbilt 2002-08-07 18:18:53 EDT
Created attachment 69405 [details]
patch to illustrate source of problem; not necessarily correct fix
Comment 2 Trond Eivind Glomsrxd 2002-08-09 14:53:56 EDT
Well, I removed all traces of the manual echo now - although it should just be a
backup mechanism anyway, and I've not seen it work otherwise. 7.2.1-15 should be it.

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