Description of problem: According to https://fedoraproject.org/wiki/FCNewInit/Initscripts cups init script status should return exit code 2 if program is dead and /var/lock/subsys/cups file exists. The reason of filling it is "InitScripts LSB compliance project (RHEL6)" https://wiki.test.redhat.com/BaseOs/Projects/InitScripts Version-Release number of selected component (if applicable): cups-1.4.0-1.fc12.x86_64 How reproducible: Always Steps to Reproduce: 1.# service cups start 2.# killall cupsd 3.# service cups status ; echo $? cupsd dead but pid file exists 1 4.# rm -f /var/run/cupsd.pid 5.# service cups status ; echo $? Actual results: cupsd is stopped 3 Expected results: dead but subsys locked 2 Additional info:
Sorry Tim, One more thing that needs to be fixed: init script should also return code "4" if restarting service under nonprivileged user: su testuserqa -c "service $SERVICE restart"; echo $? now: 0 expected: 4
I've tried cups-1.4.1-4.fc12. status action now return only code "2" # service cups start ; echo $? Starting cups: 0 # service cups status ; echo $? cups dead but subsys locked 2
Tim, I also confused about exit code for: # service cups nonexist ; echo $? Usage: cups {start|stop|restart|condrestart|reload|status} 2 Should it be "2" or "3"? According to latest https://fedoraproject.org/wiki/Packaging/SysVInitScript: "3: unimplemented feature (for example, "reload")" ps: QE also have no common opinion about it.
Hi Yulia, from my POV nonexist is invalid argument, so according to 2: invalid or excess argument(s) it should be 2. I also looked at acpid and atd init scripts because they are marked as LSB compliant here https://wiki.test.redhat.com/BaseOs/Projects/InitScripts and they both return 2. But I'm not QE, so you should know it better than me :-)
Thanks Jiri, I see.
I've tested cups-1.4.1-5.fc12. It passed all tests.