Bug 886578

Summary: start stop status undetected for /etc/init.d/firebird-superclassic
Product: [Fedora] Fedora EPEL Reporter: James Calfee <jcalfee>
Component: firebirdAssignee: Philippe Makowski <makowski.fedora>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: el6CC: jcalfee, makowski.fedora, nphilipp
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: 2012-12-31 22:35:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
/etc/init.d/firebird-superclassic none

Description James Calfee 2012-12-12 15:26:05 UTC
Created attachment 662401 [details]
/etc/init.d/firebird-superclassic

Description of problem:

This may be one of those services:
http://linux.die.net/man/8/system-config-services
Some services are incredibly hard to detect if they are running or not. While there are workarounds present to deal with these, it can't be guaranteed that they're detected properly. Please file bugs against the system-config-services component at http://bugzilla.redhat.com if you encounter such services. 


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

0.99.45

How reproducible:

100%

Steps to Reproduce:
1. Install epel repository: 

rpm -Uvh http://mirrors.kernel.org/fedora-epel/6/x86_64/epel-release-6-7.noarch.rpm

2. Install Firebird 

yum install libncurses.so.5
yum install firebird-superclassic.x86_64

3.

Start the process by running "/etc/init.d/firebird-superclassic start" then run system-config-services and try to start/stop "firebird-superclassic."

Comment 2 Nils Philippsen 2012-12-13 11:30:56 UTC
I've looked at the attached init script and it doesn't seem to implement the chkconfig service status protocol properly:

--- 8< ---
  status)
	if [ -f $pidfile ]
	then
		pid=`cat $pidfile`
		checkpid $pid
		RETVAL=$?
		[ $RETVAL -eq 0 ] && echo "$FULLNAME is running (pid $pid)" || echo "$FULLNAME is dead but pid file exists"
	else
		echo "$FULLNAME is stopped"
	fi
	;;
--- >8 ---

It looks as if it would always return the exit code 0 (which means "running) when it should 3 for a stopped service. See http://fedoraproject.org/wiki/Packaging:SysVInitScript#Exit_Codes_for_the_Status_Action for details.

In this case I guess adding the line 'RETVAL=3' after the 'echo "$FULLNAME is stopped"' line should be sufficient to make the default firebird service behave with system-config-services. Changing product/component accordingly.

Comment 3 James Calfee 2012-12-13 13:39:57 UTC
RETVAL=3 

worked... We will email the Firebird group.  
Thank you..

Comment 4 Philippe Makowski 2012-12-14 10:18:08 UTC
fixed in upstream http://tracker.firebirdsql.org/browse/CORE-4011, I will rebuild the package soon

Comment 5 Fedora Update System 2012-12-14 13:50:37 UTC
firebird-2.5.2.26539.0-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/firebird-2.5.2.26539.0-2.el6

Comment 6 Fedora Update System 2012-12-14 22:32:26 UTC
Package firebird-2.5.2.26539.0-2.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing firebird-2.5.2.26539.0-2.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2012-13778/firebird-2.5.2.26539.0-2.el6
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2012-12-31 22:35:05 UTC
firebird-2.5.2.26539.0-2.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.