Bug 523221 - initscript collected problems LSB-compilant
Summary: initscript collected problems LSB-compilant
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: am-utils
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: InitScriptsProject
TreeView+ depends on / blocked
 
Reported: 2009-09-14 14:14 UTC by Jan Ščotka
Modified: 2010-02-25 12:44 UTC (History)
2 users (show)

Fixed In Version: am-utils-6.1.5-15.fc13
Clone Of:
Environment:
Last Closed: 2010-02-25 12:44:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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