Bug 522149

Summary: Not LSB compliant initscript
Product: [Fedora] Fedora Reporter: Michal Marciniszyn <mmarcini>
Component: openCryptokiAssignee: Michal Schmidt <mschmidt>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 12CC: dan, dhorak, dkovalsk, mschmidt, mvadkert, tvujec
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 547324 (view as bug list) Environment:
Last Closed: 2010-01-22 15:34:39 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    
Attachments:
Description Flags
New initscript none

Description Michal Marciniszyn 2009-09-09 15:25:34 UTC
The pkcsslotd initscript is not LSB compliant.

[ -f $SLOTDBIN ] || exit 5
[ -f $CONFSTART ] || exit 5

in main run of the script brokes status command (always exits with 5 when there is problem with one of those. Also, -x is more appropriate in case of the binary. Put these into the start function.

More, if there is typo in command, like service pkcsslotd satrt it shall end with error code 3, not 1.

For more details about LSD compliance, please consult https://fedoraproject.org/wiki/FCNewInit/Initscripts

I'll send patch next week, just need to put this bug in the tracker due to our LSB compliance checking.

Comment 1 Michal Schmidt 2009-09-09 16:00:56 UTC
Michal, I'm looking forward to your patch. Since the initscript is taken directly from upstream (misc/pkcsslotd.in), you might want to send the patch to the mailing list opencryptoki-tech at lists.sourceforge.net.

Comment 2 Bug Zapper 2009-11-16 12:07:15 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 Michal Marciniszyn 2009-11-26 11:11:18 UTC
Created attachment 373962 [details]
New initscript

Comment 4 Miroslav Vadkerti 2009-12-03 10:35:01 UTC
Also there is another issue with the script:

The pkcsslotd script doesn't implement the force-reload option

Comment 5 Miroslav Vadkerti 2009-12-09 20:12:04 UTC
Another issue found, after issuing another start on already started pkcsslotd service, the return code is 0:

# service pkcsslotd stop
Shutting down pkcsslotd:                                   [  OK  ]

# service pkcsslotd start
Starting pkcsslotd:                                        [  OK  ]

# service pkcsslotd start
Starting pkcsslotd:   ERROR pkcsslotd-log.o[14859.-1010845952]: Shared memory creation failed (0x11)
  ERROR pkcsslotd-log.o[14859.-1010845952]: perform ipcrm -M 0x620289B6
                                                           [FAILED]
# echo $?
0

Comment 7 Michal Schmidt 2010-02-08 10:07:04 UTC
I added 'force-reload' to the initscript as a synonym for 'restart' in opencryptoki-2.3.1-2.fc13.

Comment 8 Fedora Update System 2010-04-27 08:17:43 UTC
opencryptoki-2.3.1-4.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/opencryptoki-2.3.1-4.fc13

Comment 9 Fedora Update System 2010-05-15 20:16:47 UTC
opencryptoki-2.3.1-4.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.