Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 524480 - netconsole init script collected problems LSB-compilant
Summary: netconsole init script collected problems LSB-compilant
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: InitScriptsProject
TreeView+ depends on / blocked
 
Reported: 2009-09-20 18:06 UTC by Yulia Kopkova
Modified: 2014-03-17 03:20 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-29 15:49:48 UTC
Type: ---


Attachments (Terms of Use)

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


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