Bug 541592

Summary: Init script needs a few fixes for LSB compliance
Product: [Fedora] Fedora Reporter: Radek Bíba <rbiba>
Component: mt-stAssignee: Dan Horák <dan>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: dan, dkovalsk, mcermak
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: mt-st-1.1-4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 802681 (view as bug list) Environment:
Last Closed: 2009-12-01 08:41:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 521669, 802681, 816135    

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. ***