- made pkcsslotd initscript LSB compliant (#522149)

This commit is contained in:
Dan Horák 2010-01-22 15:29:25 +00:00
parent ebe1117803
commit 42761bbabd
2 changed files with 53 additions and 1 deletions

View File

@ -0,0 +1,46 @@
diff -up opencryptoki-2.3.0/misc/pkcsslotd.in.lsb-fix opencryptoki-2.3.0/misc/pkcsslotd.in
--- opencryptoki-2.3.0/misc/pkcsslotd.in.lsb-fix 2010-01-22 15:54:25.000000000 +0100
+++ opencryptoki-2.3.0/misc/pkcsslotd.in 2010-01-22 15:57:46.000000000 +0100
@@ -17,10 +17,11 @@ LOCKFILE=/var/lock/subsys/pkcsslotd
SLOTDBIN=@METHOD_PATH@/pkcsslotd
CONFSTART=@METHOD_PATH@/pkcs11_startup
-[ -f $SLOTDBIN ] || exit 5
-[ -f $CONFSTART ] || exit 5
start() {
+ [ -x $SLOTDBIN ] || exit 5
+ [ -x $CONFSTART ] || exit 5
+
echo -n $"Starting pkcsslotd: "
# Generate the configuration information
@@ -40,8 +41,8 @@ start() {
daemon $SLOTDBIN
fi
- echo
RETVAL=$?
+ echo
[ $RETVAL -eq 0 ] && touch $LOCKFILE
return $RETVAL
}
@@ -49,8 +50,8 @@ start() {
stop() {
echo -n $"Shutting down pkcsslotd:"
killproc pkcsslotd -TERM
- echo
RETVAL=$?
+ echo
[ $RETVAL -eq 0 ] && rm -f $LOCKFILE
return $RETVAL
}
@@ -81,7 +82,7 @@ case "$1" in
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
- exit 1
+ exit 2
esac
exit $?

View File

@ -1,13 +1,15 @@
Name: opencryptoki
Summary: Implementation of the PKCS#11 (Cryptoki) specification v2.11
Version: 2.3.0
Release: 4%{?dist}
Release: 5%{?dist}
License: CPL
Group: System Environment/Base
URL: http://sourceforge.net/projects/opencryptoki
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch0: %{name}-2.2.8-do-not-create-group-in-pkcs11_startup.patch
Patch1: %{name}-2.3.0-fix-nss-breakage.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=522149
Patch2: %{name}-2.3.0-lsb.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Requires(pre): shadow-utils coreutils sed
Requires(post): chkconfig
@ -48,6 +50,7 @@ based applications.
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
# Upstream tarball has unnecessary executable perms set on the sources
@ -138,6 +141,9 @@ exit 0
%changelog
* Fri Jan 22 2010 Dan Horák <dan[at]danny.cz> 2.3.0-5
- made pkcsslotd initscript LSB compliant (#522149)
* Mon Sep 07 2009 Michal Schmidt <mschmidt@redhat.com> 2.3.0-4
- Added opencryptoki-2.3.0-fix-nss-breakage.patch on upstream request.