Bug 247103 - Initscript Review
Summary: Initscript Review
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xtide
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Mamoru TASAKA
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: InitscriptStatus
TreeView+ depends on / blocked
 
Reported: 2007-07-05 14:02 UTC by Harald Hoyer
Modified: 2007-11-30 22:12 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-07-06 02:27:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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