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"
Not sure if "4" and "5" are possible to implement.
(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
3. insufficient rights, there should be return code 4 It returns correct code "4" for "start" and "stop" actions, but "restart" still return "0".
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
Thank you. I've tried fixes and it's ok.