pcsc-lite/pcsc-lite-init.patch

67 lines
1.6 KiB
Diff

--- etc/pcscd.init.in
+++ etc/pcscd.init.in
@@ -24,12 +24,14 @@
# PC/SC lite and Musclecard frameworks. It coordinates
# communications with smart card readers, smart cards, and
# cryptographic tokens that are connected to the system.
+# X-UnitedLinux-Default-Enabled: yes
### END INIT INFO
#
# Note! pcscd should be started after pcmcia, and shut down before it
# for smooth experience with PCMCIA readers.
-. @sysconfdir_exp@/init.d/functions
+. @sysconfdir_exp@/rc.status
+rc_reset
umask 077
@@ -45,19 +47,21 @@
start() {
echo -n $"Starting PC/SC smart card daemon ($prog): "
- @sbindir_exp@/update-reader.conf && daemon $prog $PCSCD_OPTIONS
+ @sbindir_exp@/update-reader.conf && startproc $exec $PCSCD_OPTIONS
retval=$?
+ rc_status
echo
[ $retval -eq 0 ] && touch $lockfile
- return $retval
+ rc_status -v
}
stop() {
echo -n $"Stopping PC/SC smart card daemon ($prog): "
- killproc $prog
+ killproc $exec
retval=$?
+ rc_status
echo
[ $retval -eq 0 ] && rm -f $lockfile
- return $retval
+ rc_status -v
}
restart() {
stop
@@ -73,12 +77,19 @@
restart
;;
status)
- status $prog
+ checkproc $exec
+ rc_status -v
;;
condrestart|try-restart)
- [ ! -f $lockfile ] || restart
+ if test -f $lockfile ; then
+ restart
+ else
+ rc_reset
+ fi
+ rc_status
;;
*)
echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
exit 2
esac
+rc_exit