2010-02-08 09:12:29 +00:00
|
|
|
Index: opencryptoki-2.3.1/misc/pkcsslotd.in
|
|
|
|
===================================================================
|
|
|
|
--- opencryptoki-2.3.1.orig/misc/pkcsslotd.in
|
|
|
|
+++ opencryptoki-2.3.1/misc/pkcsslotd.in
|
2010-01-22 15:29:25 +00:00
|
|
|
@@ -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
|
|
|
|
}
|
2010-02-08 10:14:26 +00:00
|
|
|
@@ -73,15 +74,15 @@ case "$1" in
|
2010-02-08 09:12:29 +00:00
|
|
|
status)
|
|
|
|
status pkcsslotd $SLOTDBIN
|
|
|
|
;;
|
|
|
|
- restart|reload)
|
|
|
|
+ restart|reload|force-reload)
|
|
|
|
restart
|
|
|
|
;;
|
|
|
|
condrestart)
|
2010-02-08 10:14:26 +00:00
|
|
|
[ -f $LOCKFILE ] && restart || :
|
2010-01-22 15:29:25 +00:00
|
|
|
;;
|
|
|
|
*)
|
2010-02-08 10:14:26 +00:00
|
|
|
- echo $"Usage: $0 {start|stop|status|restart|condrestart}"
|
2010-01-22 15:29:25 +00:00
|
|
|
- exit 1
|
2010-02-08 10:14:26 +00:00
|
|
|
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload}"
|
2010-01-22 15:29:25 +00:00
|
|
|
+ exit 2
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit $?
|