Le mercredi 30 octobre 2002 � 10:19:00, Sean Atkinson a �crit:
> To work around this and make the startup script more Red Hat friendly
> (so I can use "service pcscd status"), please find my patch below.
> You may like to selectively use bits of this in your script as
> required. I'm not sure whether these changes are useful enough to be
> included in the next public release, but in my opinion there's no good
> reason why a machine losing power should require manual intervention
> to recover a crashed daemon.
I agree that "there's no good reason why a machine losing power should
require manual intervention to recover a crashed daemon" but I
STRONGLY object to your patch.
According to "Filesystem Hierarchy Standard" [1]:
" Although data stored in /tmp may be deleted in a site-specific
manner, it is recommended that files and directories located in /tmp
be deleted whenever the system is booted.
FHS added this recommendation on the basis of historical precedent and
common practice, but did not make it a requirement because system
administration is not within the scope of this standard. "
So if your operating system do not remove files in /tmp during reboot
you should patch your system and not the pcscd starting script.
In a similar way the directory /var/run shall also be cleared at each
reboot [2].
So I do not see _any_ good reason to force the removal of /tmp/pcsc/.
I you read pcsc-lite Changelog you will see:
2002-08-13 Ludovic Rousseau
* src/pcscdaemon.c:
add support for --apdu, test if the pcscd is still running before
complaining that /tmp/pcsc is present
So pcscd should only exist will a valid reason.
I am open to discussion if you want.
Bye,
> --- pcsc-lite-1.1.2/doc/pcscd.startup 2002-07-01 21:14:09.000000000 +0100
> +++ /etc/init.d/pcscd 2002-10-30 10:04:30.000000000 +0000
> # Source config
> PATH=/sbin:/bin:/usr/local/sbin:/usr/bin:/usr/sbin
> @@ -20,14 +17,15 @@
>
> start() {
> echo -n $"Starting smart card daemon: "
> - pcscd $SYSLOGD_OPTIONS
> + rm -rf /tmp/pcsc/ # clean up after crash
> + daemon pcscd $SYSLOGD_OPTIONS -d syslog
> RETVAL=$?
> echo
> [ $RETVAL -eq 0 ] && touch /var/lock/subsys/pcscd
> return $RETVAL
[1] http://www.pathname.com/fhs/2.2/fhs-3.15.html
[2] http://www.pathname.com/fhs/2.2/fhs-5.13.html
--
Dr. Ludovic Rousseau [EMAIL PROTECTED]
-- Normaliser Unix c'est comme pasteuriser le Camembert, L.R. --
_______________________________________________
Muscle mailing list
[EMAIL PROTECTED]
http://lists.musclecard.com/mailman/listinfo/muscle