Bug 524480

Summary: netconsole init script collected problems LSB-compilant
Product: [Fedora] Fedora Reporter: Yulia Kopkova <ykopkova>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: notting, rvokal
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-29 15:49:48 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: 521669    

Description Yulia Kopkova 2009-09-20 18:06:29 UTC
According to https://fedoraproject.org/wiki/FCNewInit/Initscripts dumpconf init
script have some LSB-compilant problems:

1. LSB Header

2. insufficient rights, there should be return code 4
   # su testuserqa -c "service netconsole restart"; echo $?
now: 0 
expected: 4

3. /var/lock/subsys/netconsole should be created when service starts and if netconsole is dead and /var/lock/subsys/netconsole lock file exists then
status action should return code "2".

4. netconsole init script should also support "try-restart" and
"force-reload" actions.

The reason of filling it is "InitScripts LSB compliance project"

Comment 1 Bill Nottingham 2009-09-21 17:49:10 UTC
(In reply to comment #0)
> According to https://fedoraproject.org/wiki/FCNewInit/Initscripts dumpconf init
> script have some LSB-compilant problems:

Not a vaild guideline. I'll assume you mean the valid guideline page.

> 1. LSB Header
> 
> 2. insufficient rights, there should be return code 4
>    # su testuserqa -c "service netconsole restart"; echo $?
> now: 0 
> expected: 4

modprobe does not distinguish error varieties. Return code set to '1', which is a valid error return.

> 3. /var/lock/subsys/netconsole should be created when service starts and if
> netconsole is dead and /var/lock/subsys/netconsole lock file exists then
> status action should return code "2".

There is not a daemon, this makes no sense whatsoever.

> 4. netconsole init script should also support "try-restart" and
> "force-reload" actions.

try-restart is optional. force-reload added.

http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=709ef82796b5340fd286f1416ee967ac8c1979f8

Comment 2 Yulia Kopkova 2009-09-24 12:42:20 UTC
Bill, can you please also fix

5. nonexist action should have return code 3 and usage info:
    # service netconsole nonexist ; echo $?   
 now: 3
 expected: 2


Sorry for that.

Comment 3 Bill Nottingham 2009-09-24 17:38:00 UTC
How so? 2 is 'invalid or excess arguments'.

Comment 4 Yulia Kopkova 2009-09-24 19:51:51 UTC
Yes, it a bit confused. It was a topic of discussion in QE.
 
So it was decided to use code "2" instead of "3" (unimplemented feature)

Comment 5 Bill Nottingham 2009-09-25 16:47:09 UTC
Is there any commentary on the upstream LSB on this?

Comment 6 Yulia Kopkova 2009-09-29 09:42:30 UTC
I was not able to find something about this. 

Here is a Fedora initscript template:
https://fedoraproject.org/wiki/Packaging/SysVInitScript