Bug 521641

Summary: cups init script collected problems LSB-compilant
Product: [Fedora] Fedora Reporter: Yulia Kopkova <ykopkova>
Component: cupsAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: dkovalsk, jpopelka, twaugh
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.4.1-5.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-25 12:12:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 521669    

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.