- fixed pidfile creating and usage (#547324)
This commit is contained in:
parent
f86e736e8c
commit
fdde48d4bf
36
opencryptoki-2.3.1-pidfile.patch
Normal file
36
opencryptoki-2.3.1-pidfile.patch
Normal file
@ -0,0 +1,36 @@
|
||||
diff -up opencryptoki-2.3.1/misc/pkcsslotd.in.pidfile opencryptoki-2.3.1/misc/pkcsslotd.in
|
||||
--- opencryptoki-2.3.1/misc/pkcsslotd.in.pidfile 2010-04-26 16:33:00.000000000 +0200
|
||||
+++ opencryptoki-2.3.1/misc/pkcsslotd.in 2010-04-26 16:33:31.000000000 +0200
|
||||
@@ -27,19 +27,7 @@ start() {
|
||||
# Generate the configuration information
|
||||
$CONFSTART
|
||||
|
||||
- ## Start daemon with startproc(8). If this fails
|
||||
- ## the echo return value is set appropriate.
|
||||
- if [ ! -f $PIDFILE ]; then
|
||||
- # pid file does not exist
|
||||
- daemon --force $SLOTDBIN
|
||||
- elif ! ps -h --pid `cat $PIDFILE` | grep "$SLOTDBIN" 2>&1 >/dev/null; then
|
||||
- # pid file exists but named pid not
|
||||
- rm -f $PIDFILE
|
||||
- daemon --force $SLOTDBIN
|
||||
- else
|
||||
- # just to have "failed" message
|
||||
- daemon $SLOTDBIN
|
||||
- fi
|
||||
+ daemon $SLOTDBIN
|
||||
|
||||
RETVAL=$?
|
||||
echo
|
||||
diff -up opencryptoki-2.3.1/usr/include/pkcs11/slotmgr.h.pidfile opencryptoki-2.3.1/usr/include/pkcs11/slotmgr.h
|
||||
--- opencryptoki-2.3.1/usr/include/pkcs11/slotmgr.h.pidfile 2010-04-26 16:32:42.000000000 +0200
|
||||
+++ opencryptoki-2.3.1/usr/include/pkcs11/slotmgr.h 2010-04-26 16:32:46.000000000 +0200
|
||||
@@ -325,7 +325,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
-#define PID_FILE_PATH CONFIG_PATH "/.slotpid"
|
||||
+#define PID_FILE_PATH "/var/run/pkcsslotd.pid"
|
||||
|
||||
#ifndef CK_BOOL
|
||||
#define CK_BOOL CK_BBOOL
|
@ -1,14 +1,18 @@
|
||||
Name: opencryptoki
|
||||
Summary: Implementation of the PKCS#11 (Cryptoki) specification v2.11
|
||||
Version: 2.3.1
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?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
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=522149
|
||||
# https://sourceforge.net/tracker/?func=detail&aid=2992772&group_id=128009&atid=710344
|
||||
Patch2: %{name}-2.3.0-lsb.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=547324
|
||||
# https://sourceforge.net/tracker/?func=detail&aid=2992760&group_id=128009&atid=710344
|
||||
Patch3: %{name}-2.3.1-pidfile.patch
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
Requires(pre): shadow-utils coreutils sed
|
||||
Requires(post): chkconfig
|
||||
@ -49,6 +53,7 @@ based applications.
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
# Upstream tarball has unnecessary executable perms set on the sources
|
||||
@ -139,6 +144,9 @@ exit 0
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Apr 26 2010 Dan Horák <dan[at]danny.cz> 2.3.1-4
|
||||
- fixed pidfile creating and usage (#547324)
|
||||
|
||||
* Mon Feb 08 2010 Michal Schmidt <mschmidt@redhat.com> 2.3.1-3
|
||||
- Also list 'reload' and 'force-reload' in "Usage: ...".
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user