Bug 71027 - postgresql init script doesn't call success()
Summary: postgresql init script doesn't call success()
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: postgresql
Version: limbo
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Trond Eivind Glomsrxd
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-08-07 22:18 UTC by Jay Berkenbilt
Modified: 2007-04-18 16:45 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-08-07 22:18:57 UTC
Embargoed:


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

Description Jay Berkenbilt 2002-08-07 22:18:09 UTC
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 22:18:53 UTC
Created attachment 69405 [details]
patch to illustrate source of problem; not necessarily correct fix

Comment 2 Trond Eivind Glomsrxd 2002-08-09 18:53:56 UTC
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.