/etc/init.d/pcscd works only at first start.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pcsc-lite (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
"/etc/init.d/pcscd *" resp. "service pcscd *" works only at first "start".
In all other cases it just does nothing resp. starts one more pcscd.
Examples:
root@liberty:/etc# service pcscd start
root@liberty:/etc# ps -ef|grep pcscd
root 3850 1884 0 16:09 pts/10 00:00:00 /usr/sbin/pcscd
root@liberty:/etc# service pcscd start
root@liberty:/etc# ps -ef|grep pcscd
root 3850 1884 0 16:09 pts/10 00:00:01 /usr/sbin/pcscd
root 5230 1884 0 17:49 pts/10 00:00:00 /usr/sbin/pcscd
root@liberty:/etc# service pcscd stop
root@liberty:/etc# ps -ef|grep pcscd
root 3850 1884 0 16:09 pts/10 00:00:01 /usr/sbin/pcscd
root 5230 1884 0 17:49 pts/10 00:00:00 /usr/sbin/pcscd
root@liberty:/etc# /etc/init.d/pcscd stop
root@liberty:/etc# ps -ef|grep pcscd
root 3850 1884 0 16:09 pts/10 00:00:01 /usr/sbin/pcscd
root 5230 1884 0 17:49 pts/10 00:00:00 /usr/sbin/pcscd
root@liberty:/etc# service pcscd restart
* Restarting PCSC Lite resource manager pcscd [ OK ]
root@liberty:/etc# ps -ef|grep pcscd
root 3850 1884 0 16:09 pts/10 00:00:01 /usr/sbin/pcscd
root 5230 1884 0 17:49 pts/10 00:00:00 /usr/sbin/pcscd
root 5295 1884 0 17:52 pts/10 00:00:00 /usr/sbin/pcscd
###
The problem is caused by these lines in /etc/init.d/pcscd:
# create $IPCDIR with correct access rights
rm -rf $IPCDIR
mkdir $IPCDIR
chgrp pcscd $IPCDIR
chmod g+w $IPCDIR
Since PIDFILE=
"start-stop-daemon" in /etc/init.d/pcscd using option "--pidfile $PIDFILE" can not work anymore.
Commenting the lines above makes the script work as expected (or at least as expected by _me_).
###
Another minor problem is the line "chgrp pcscd $IPCDIR" in the init script: Group pcscd does not exist.
Creating the group myself does not change anything, neither positive nor negative -
except for the fact that the group is then set on $IPCDIR:
wolf@liberty:/run$ ls -ld pcscd
drwxr-xr-x 2 root pcscd 80 Dez 22 17:52 pcscd
wolf@liberty:/run$ ls -l pcscd
total 4
srw-rw-rw- 1 root root 0 Dez 22 17:52 pcscd.comm
-rw-r--r-- 1 root root 6 Dez 22 17:52 pcscd.pid
###
pcscd --version
pcsc-lite version 1.8.10.
Copyright (C) 1999-2002 by David Corcoran <email address hidden>.
Copyright (C) 2001-2011 by Ludovic Rousseau <email address hidden>.
Copyright (C) 2003-2004 by Damien Sauveron <email address hidden>.
Report bugs to <email address hidden>.
Enabled features: Linux x86_64-pc-linux-gnu serial usb libudev usbdropdir=
apt-cache policy pcscd
pcscd:
Installed: 1.8.10-1ubuntu1
Candidate: 1.8.10-1ubuntu1
Version table:
*** 1.8.10-1ubuntu1 0
500 http://
100 /var/lib/
OS: Ubuntu 14.04 64bit
3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Since this is my first fault report here I probably made the mistake to assign it to pcsc-cyberjack instead to pcscd => trying to fix it right now ....