Bug 247103

Summary: Initscript Review
Product: [Fedora] Fedora Reporter: Harald Hoyer <harald>
Component: xtideAssignee: Mamoru TASAKA <mtasaka>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: dave
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: 2007-07-06 02:27:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 246824    

Description Harald Hoyer 2007-07-05 14:02:56 UTC
Please have a look at the wikipage 
http://fedoraproject.org/wiki/FCNewInit/Initscripts
and change your initscripts to comply with the LSB standard.
Especially check the exit status and add a LSB Header.
E.g. starting a service should return with 0, if the service is already running and stopping a stopped service should also return with 0.

Also check, if your service has to be _on_ per default, and turn it off in the old chkconfig line, if not.

Thank you.

Comment 1 Mamoru TASAKA 2007-07-05 14:26:08 UTC
Well, I would say that xttpd should be okay if 
/etc/rc.d/init.d/function is correct.

Actually I use "daemon $DAEMON", "failure" "status $PROG" etc...
So if I have to fix up xttpd, *FIRST* I need the documents
what funtions in /etc/rc.d/init.d/functions return.
Any documents which explain this?

Comment 2 Mamoru TASAKA 2007-07-05 14:30:46 UTC
(In reply to comment #1)
> So if I have to fix up xttpd, *FIRST* I need the documents
> what funtions in /etc/rc.d/init.d/functions return.


I meant "I need the documents what status the functions
in /etc/rc.d/init.d/functions return".


Comment 3 Harald Hoyer 2007-07-05 14:32:13 UTC
A quick look in /etc/rc.d/init.d/functions reveils:
success() returns 0
failure() returns the last return code

for status() and daemon() just look in /etc/rc.d/init.d/functions.. fairly easy
to read.

Comment 4 Mamoru TASAKA 2007-07-05 14:59:07 UTC
Umm.. for me killproc() seems wrong.

http://fedoraproject.org/wiki/FCNewInit/Initscripts says the following
case must be considered as success:
* running stop on a service already stopped or not running

However, service {gpm,xttpd} stop when {gpm,xttpd} is stopped
returns the message [FAILED], and the exit status is 0.... 
From the scripts, these only calls killproc() .

Comment 5 Mamoru TASAKA 2007-07-06 02:27:18 UTC
Once closing as INSUFFICIENT_DATA. Actually, more explanation
of initscripts side function, new proposal to packaging committee,
and the proposal of what _must_ fix and what _should_ fix...
seems missing for now.