Bug 524486 - netfs init script collected problems LSB-compilant
Summary: netfs 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:46 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-10-02 19:03:25 UTC


Attachments (Terms of Use)

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

1. LSB Header not complete

2. status action should return code "3" for stopped service
   # service netfs stop
   # service netfs status ; echo $?
now: 2
expected: 3

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

4. if netfs is dead and /var/lock/subsys/netfs lock file exists then
status action should return code "2".

5. netfs init script should also support, "condrestart", "try-restart" and
"force-reload" actions.

6. nonexist action should have return code 3 and usage info:
   # service netfs nonexist ; echo $?   
now: 1
expected: 3 


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

Comment 1 Yulia Kopkova 2009-09-20 19:11:40 UTC
Not sure if "4" and "5" are possible to implement.

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

It's not required; adding dependencies here would break the world.

> 2. status action should return code "3" for stopped service
>    # service netfs stop
>    # service netfs status ; echo $?
> now: 2
> expected: 3

Fixed.

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

Fixed.

> 4. if netfs is dead and /var/lock/subsys/netfs lock file exists then
> status action should return code "2".

As stated in comment #1, not possible.

> 5. netfs init script should also support, "condrestart", "try-restart" and
> "force-reload" actions.

Generally, not a good idea for network mounts. (Arguably, it shouldn't even support restart.)

> 6. nonexist action should have return code 3 and usage info:
>    # service netfs nonexist ; echo $?   
> now: 1
> expected: 3 

Fixed.
http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=7e8a81407d12d2b92f20de240d2a6c928ab41d8a

Comment 3 Yulia Kopkova 2009-09-24 11:49:21 UTC
3. insufficient rights, there should be return code 4

It returns correct code "4" for "start" and "stop" actions, but "restart" still return "0".

Comment 4 Yulia Kopkova 2009-09-24 12:01:23 UTC
Bill, I'm really sorry for more work, but after some discussions it's agreed in QE that:

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

Comment 5 Yulia Kopkova 2009-09-30 15:35:38 UTC
Thank you. I've tried fixes and it's ok.


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