Description of problem: The postgresql script does not return a failure value under some conditions. I have currently tested two conditions: 1) stop of postgresql service when the process is not active 2) start of postgresql with a broken configuration in both cases the init script report correctly a failure but return a value of 0 (which means success) instead of 1 (which means failure) Version-Release number of selected component (if applicable): postgresql-7.4.13-2.RHEL4.1 How reproducible: always Steps to Reproduce: 1. # /etc/init.d/postgresql start Starting postgresql service: [ OK ] 2. # killall -9 postmaster # 3. # /etc/init.d/postgresql stop Stopping postgresql service: [FAILED] # echo $? 0 Actual results: return a value of 0 for a failure. Expected results: return a value 1 for a failure. This error makes unrealiable and possibly dangerous the use of this script with programs that make decision based on this return value, such as cluster suite. Additional info: I am attaching a simple patch that fix the problem.
Created attachment 131935 [details] patch for the postgresql init script
Created attachment 142927 [details] another version of patch for postgresql-server's init script Hi, I have exactly the same problem and created a similar patch before checking this BZ, while testing postgresql with cluster suite. I attached my version of patch, just for the record. Perhaps, it might be helpful. (Reference: LSB 3.1.0 core http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html)
Created attachment 142941 [details] another patch for postgresql init script (2) This patch contains some minor fixes and updates to treat the situation mentioned in the LSB web page I referred in previous comment: """In addition to straightforward success, the following situations are also to be considered successful: ... * running start on a service already running * running stop on a service already stopped or not running ... """
This request was evaluated by Red Hat Product Management for inclusion, but this component is not scheduled to be updated in the current Red Hat Enterprise Linux release. If you would like this request to be reviewed for the next minor release, ask your support representative to set the next rhel-x.y flag to "?".
User mceci's account has been closed
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. Please See https://access.redhat.com/support/policy/updates/errata/ If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.