Bug 521641 - cups init script collected problems LSB-compilant
Summary: cups init script collected problems LSB-compilant
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: cups
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: InitScriptsProject
TreeView+ depends on / blocked
 
Reported: 2009-09-07 12:02 UTC by Yulia Kopkova
Modified: 2010-01-21 15:13 UTC (History)
3 users (show)

Fixed In Version: 1.4.1-5.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-25 12:12:57 UTC


Attachments (Terms of Use)

Description Yulia Kopkova 2009-09-07 12:02:50 UTC
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:

Comment 4 Yulia Kopkova 2009-09-17 09:23:20 UTC
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

Comment 5 Yulia Kopkova 2009-09-23 11:03:45 UTC
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

Comment 6 Yulia Kopkova 2009-09-24 10:34:34 UTC
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.

Comment 7 Jiri Popelka 2009-09-24 11:48:32 UTC
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 :-)

Comment 8 Yulia Kopkova 2009-09-24 12:38:10 UTC
Thanks Jiri, I see.

Comment 9 Yulia Kopkova 2009-09-25 11:19:53 UTC
I've tested cups-1.4.1-5.fc12. 

It passed all tests.


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