Bug 247103 - Initscript Review
Initscript Review
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: xtide (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Mamoru TASAKA
Fedora Extras Quality Assurance
:
Depends On:
Blocks: InitscriptStatus
  Show dependency treegraph
 
Reported: 2007-07-05 10:02 EDT by Harald Hoyer
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-07-05 22:27:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Harald Hoyer 2007-07-05 10:02:56 EDT
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 10:26:08 EDT
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 10:30:46 EDT
(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 10:32:13 EDT
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 10:59:07 EDT
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-05 22:27:18 EDT
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.