Bug 541592 - Init script needs a few fixes for LSB compliance
Summary: Init script needs a few fixes for LSB compliance
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mt-st
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Dan Horák
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 786516 (view as bug list)
Depends On:
Blocks: InitScriptsProject 802681 816135
TreeView+ depends on / blocked
 
Reported: 2009-11-26 12:36 UTC by Radek Bíba
Modified: 2012-04-25 10:36 UTC (History)
3 users (show)

Fixed In Version: mt-st-1.1-4
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 802681 (view as bug list)
Environment:
Last Closed: 2009-12-01 08:41:44 UTC


Attachments (Terms of Use)

Description Radek Bíba 2009-11-26 12:36:13 UTC
Description of problem:
mt-st contains an init script for stinit. It's not an ordinary service, I realize that, but it should obey at least an applicable subset of guidelines for init scripts. Here are current problems:

1] When the 'service' isn't configured, ie. /etc/stinit.def doesn't exist, an attempt to start it prints nothing and exits with 0. It's supposed to exit with code 6.

On a related note, I see stinit it set to be started in all runlevels by default. So, *fortunately* it doesn't fail with an scary message by default, e.g. when system is booting, However, since it can't start unless it's configured, I suggest it be set not to be started by default at all. Users interested in this 'service' should configure it and mark it for starting in desired runlevels.

2] When the init script is executed with no or an unknown/unimplemented action, it correctly prints its usage message, but exits with 1. This should be 2.

Which implies that the 'stop' branch that does nothing should be removed, so that users trying to stop stinit get a usage message (and exit code 2). If you really want to special-case that, feel free to use exit code 3, but I think it's fine for 'stop' to fall into the category of invalid commands.

Version-Release number of selected component (if applicable):
mt-st-1.1-3.fc12

Additional info:
See https://fedoraproject.org/wiki/Packaging/SysVInitScript for details.

Comment 1 Dan Horák 2009-11-26 15:52:00 UTC
Points 1 and 2 are fixed and LSB header is added. But I would like to keep the stop action as is, because exiting with an error could "break" the system shutdown.

Comment 2 Radek Bíba 2009-11-27 08:15:05 UTC
Good point, thanks.

Comment 3 Fedora Update System 2009-12-01 08:55:30 UTC
mt-st-1.1-4.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/mt-st-1.1-4.fc12

Comment 4 Radek Bíba 2009-12-01 11:08:53 UTC
Thanks for updating the init scripts. It passes my test case now.

Comment 5 Fedora Update System 2009-12-18 04:30:41 UTC
mt-st-1.1-4.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Dan Horák 2012-02-05 11:15:24 UTC
*** Bug 786516 has been marked as a duplicate of this bug. ***


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