Bug 523221

Summary: initscript collected problems LSB-compilant
Product: [Fedora] Fedora Reporter: Jan Ščotka <jscotka>
Component: am-utilsAssignee: Karel Zak <kzak>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: dkovalsk, kzak
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: am-utils-6.1.5-15.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-02-25 12:44:08 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 Jan Ščotka 2009-09-14 14:14:54 UTC
Description of problem:
there are few problems with initscript of service:
based on document:
https://fedoraproject.org/wiki/Packaging/SysVInitScript

1. bad return code of status command, when service is killed and lock file still exist
# service amd status; echo $?
now: 1
expected: 2

2. there arent implemented LSB compilant functions which are requred:
 try-restart
 usage
 force-reload

3. nonexist function should have returncode 3:
# service $SERVICE noexistop; echo $?
now: 1
expected: 3

4. bad argunments should have returncode 2:
# service $SERVICE; echo $?
now: 1
expected: 2

5. insufficient rights, there should be returncode 4
# su testuserqa -c "service $SERVICE restart"; echo $?
now: 1 
expected: 4

Comment 1 Bug Zapper 2009-11-16 12:21:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Karel Zak 2010-02-24 14:09:52 UTC
(In reply to comment #0)

> https://fedoraproject.org/wiki/Packaging/SysVInitScript
> 
> 1. bad return code of status command, when service is killed and lock file
> still exist
> # service amd status; echo $?
> now: 1
> expected: 2

 Fixed.

> 2. there arent implemented LSB compilant functions which are requred:
>  try-restart
>  usage
>  force-reload

 Fixed.

> 3. nonexist function should have returncode 3:
> # service $SERVICE noexistop; echo $?
> now: 1
> expected: 3

 Hmm.. strange. The template in Packaging/SysVInitScript returns '2' in this example and for example bug #541402 expects '2' too.

 So fixed, but returns '2'.

> 4. bad argunments should have returncode 2:
> # service $SERVICE; echo $?
> now: 1
> expected: 2

 Fixed.
 
> 5. insufficient rights, there should be returncode 4
> # su testuserqa -c "service $SERVICE restart"; echo $?
> now: 1 
> expected: 4    

 Fixed.

All should be fixed in F-13 and rawhide.

Comment 4 Fedora Update System 2010-02-24 14:12:24 UTC
am-utils-6.1.5-15.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/am-utils-6.1.5-15.fc13

Comment 6 Fedora Update System 2010-02-25 12:44:03 UTC
am-utils-6.1.5-15.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.