Bug 661260

Summary: Initscript needs some changes to enhance its behaviour, stop rpmlint reporting an error and generally to get it closer to what is considered a standard for Fedora
Product: [Fedora] Fedora Reporter: Jan Pokorný [poki] <jpokorny>
Component: luciAssignee: Jan Pokorný [poki] <jpokorny>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 14CC: cfeist, fdinitto, rmccabe
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-13 19:36:01 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: 660446    
Bug Blocks: 661248    

Description Jan Pokorný [poki] 2010-12-08 11:05:26 UTC
Currently, luci is quite far away from what is suggested at [1].

These differences/pitfalls are (not exhausting):
- restart != reload
- no system/standard start/stop success/failure pretty messages
  (using sourced "functions" library)
- strange start/stop priority
  - luci starts saslauthd service with 65 10 priorities while luci
    originally defines 25 78
  - proposed priorities are 99 01 (rationale: luci is user application
    so even if it is configured to start automatically with the start of
    system, it can be clearly amongs services that are started last and
    stopped amongs first)
- "if [ $? -ne 0 ]; then return $?; fi" construct is a coding mistake
- for files that shouldn't be ever exposed to each system user for reading
  (even few miliseconds or so is not desired!) and are created dynamically
  by the initscript, it is better to touch them and set required attributes
  and ownership first and then to have their content generated
  (rather then to generate the content and to change attributes and ownership
  as this attitude will create a short gap in which the file is readable
  by any user -- writing to file usually doesn't affect its attributes a/o
  ownership)
- lock file is not currently utilized which makes rmplint reporting an error:

luci.x86_64: E: subsys-not-used /etc/rc.d/init.d/luci
While your daemon is running, you have to put a lock file in
/var/lock/subsys/. To see an example, look at this directory on your machine
and examine the corresponding init scripts.

----
[1] http://fedoraproject.org/wiki/Packaging:SysVInitScript


Note: this was fixed in the context of work on pkg-update upstream
      branch which means the fix ties closely to the major change
      brought from this branch into main-line upstream code
      in connection with bug #660446

Comment 1 Jan Pokorný [poki] 2010-12-08 14:50:28 UTC
Commit http://git.fedorahosted.org/git/?p=luci.git;a=commit;h=ff167a9f4dc802ad8c92e588b12f6440b9383e1e addresses this bug.

Comment 2 Jan Pokorný [poki] 2010-12-08 15:48:40 UTC
In addition, very little (cosmetic) change was committed in
http://git.fedorahosted.org/git/?p=luci.git;a=commit;h=d16295efb8bb4cf7021a4f7e15a799583cd25381