Bug 523397 - initscript collected problems LSB-compilant ypxfrd
Summary: initscript collected problems LSB-compilant ypxfrd
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: ypserv
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Karel Klíč
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: InitScriptsProject
TreeView+ depends on / blocked
 
Reported: 2009-09-15 10:58 UTC by Jan Ščotka
Modified: 2013-03-03 22:59 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-01-21 18:55:00 UTC


Attachments (Terms of Use)

Description Jan Ščotka 2009-09-15 10:58:53 UTC
There are some problems with LSB-compilants of initscript against
https://fedoraproject.org/wiki/Packaging/SysVInitScript definition.

service: ypxfrd

I've created some test and there is output of run (PASS menas that it started correctly, FAIL, that there is some problem with returncode, explanaition in brackets):

:: [   LOG    ] :: >>>>>>>>> service start
:: [   PASS   ] ::  Service must start without problem
:: [   PASS   ] ::  Then Status command 
:: [   PASS   ] ::  Already started service 
:: [   PASS   ] ::  Again status command 
:: [   LOG    ] :: >>>>>>>>> service restart
:: [   PASS   ] ::  Restarting of service
:: [   PASS   ] ::  Status command 
:: [   LOG    ] :: >>>>>>>>> service stop
:: [   PASS   ] ::  Stopping service 
:: [   PASS   ] ::  Status of stopped service 
:: [   PASS   ] ::  Stopping service again 
:: [   PASS   ] ::  Status of stopped service 
:: [   LOG    ] :: >>>>>>>>> pid file
:: [   FAIL   ] :: File /var/run/ypxfrd.pid should exist 
:: [   PASS   ] :: Running 'echo 666666 > /var/run/ypxfrd.pid'
:: [   FAIL   ] ::  Existing pid file, but service not started  (Expected 1, got 3)
:: [   LOG    ] :: >>>>>>>>> lock file
:: [   PASS   ] :: File /var/lock/subsys/ypxfrd should exist
:: [   PASS   ] :: Running 'touch /var/lock/subsys/ypxfrd'
:: [   FAIL   ] ::  Existing lock file, but service not started  (Expected 2, got 3)
:: [   LOG    ] :: >>>>>>>>> insufficient rights
:: [   PASS   ] ::  Starting service for restarting under nonpriv user 
:: [   FAIL   ] :: Insufficient rights, restarting resrvice under nonprivileged user must fail (Expected 4, got 0)
:: [   LOG    ] :: >>>>>>>>> operations
:: [   PASS   ] ::  Service have to implement start function 
:: [   PASS   ] ::  Service have to implement restart function 
:: [   PASS   ] ::  Service have to implement status function 
:: [   FAIL   ] ::  Service have to implement usage function  (Expected 0, got 1)
:: [   PASS   ] ::  Service have to implement condrestart function 
:: [   FAIL   ] ::  Service have to implement try-restart function  (Expected 0, got 1)
:: [   PASS   ] ::  Service have to implement reload function 
:: [   FAIL   ] ::  Service have to implement force-reload function  (Expected 0, got 1)
:: [   LOG    ] :: >>>>>>>>> nonexist operations
:: [   FAIL   ] ::  Testing proper return code when nonexisting function (Expected 2, got 1)
:: [   LOG    ] :: >>>>>>>>> invalid arguments
:: [   FAIL   ] ::  When no arguments added to service, it must fail with proper return code  (Expected 2, got 1)

There are some problems:
* pid file must exist and service when not run, it must have returncode 1
* similar for lock file, excep, there should be returncode 2
* working under unprevileged user must return 4
* it should implement usage, try-restart, force-reload functions, or return code when it isnt implemented (3)
* when is used bad function or none, that it must return code 2

Comment 1 Bug Zapper 2009-11-16 12:25:21 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 4 Karel Klíč 2010-01-21 18:55:00 UTC
Fixed in rawhide.


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