В наличии Rutoken S и Ubuntu 12.04.
Поставил libccid, pcscd, libpcsclite1, драйвер и pcsc-tools.
После этого pcsc_scan ловил подключение/отключение устройства.
Потом поставил OpenCT и pcsc_scan перестал реагировать на подключение токена (вывод pcsc_scan и pcscd -afddddd соответствует первым 2м картинкам в этой теме).
Отредактировал /usr/lib/pcsc/drivers/openct-ifd.bundle/Contents/Info.plist.
user@host:~$ cat /usr/lib/pcsc/drivers/openct-ifd.bundle/Contents/Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>openct-ifd.so</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>openct-ifd</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.0.1d1</string>
<key>ifdManufacturerString</key>
<string>OpenCT Project (www.opensc-project.org/openct/)</string>
<key>ifdProductString</key>
<string>PC/SC Lite IFD wrapper for OpenCT</string>
<key>ifdCapabilities</key>
<string>0x00000000</string>
<key>ifdProtocolSupport</key>
<string>0x00000001</string>
<key>ifdVersionNumber</key>
<string>0x00000001</string>
<key>ifdVendorID</key>
<array>
<string>0x0973</string>
<string>0x0529</string>
<string>0x0529</string>
<string>0x0529</string>
<string>0x0529</string>
<string>0x073d</string>
<string>0x04b9</string>
<string>0x04b9</string>
<string>0x096e</string>
<string>0x03f0</string>
<string>0x046a</string>
<string>0x04e6</string>
<string>0x04e6</string>
<string>0x04e6</string>
<string>0x04e6</string>
<string>0x04e6</string>
<string>0x04e6</string>
<string>0x073d</string>
<string>0x076b</string>
<string>0x076b</string>
<string>0x076b</string>
<string>0x076b</string>
<string>0x076b</string>
<string>0x0783</string>
<string>0x08e6</string>
<string>0x08e6</string>
<string>0x08e6</string>
<string>0x0b97</string>
<string>0x0b97</string>
<string>0x0bf8</string>
<string>0x0dc3</string>
<string>0x072f</string>
<string>0x072f</string>
<string>0x072f</string>
<string>0x072f</string>
<string>0x072f</string>
<string>0x072f</string>
<string>0x104f</string>
<string>0x0c4b</string>
<string>0x0a89</string>
<string>0x0a89</string>
</array>
<key>ifdProductID</key>
<array>
<string>0x0001</string>
<string>0x050c</string>
<string>0x0514</string>
<string>0x0600</string>
<string>0x0700</string>
<string>0x0005</string>
<string>0x1202</string>
<string>0x1300</string>
<string>0x0005</string>
<string>0x1024</string>
<string>0x0010</string>
<string>0x5115</string>
<string>0x5116</string>
<string>0x5117</string>
<string>0x511d</string>
<string>0xE001</string>
<string>0xE003</string>
<string>0x0c00</string>
<string>0x1021</string>
<string>0x3021</string>
<string>0x5121</string>
<string>0x5321</string>
<string>0x6622</string>
<string>0x0003</string>
<string>0x3437</string>
<string>0x3438</string>
<string>0x4433</string>
<string>0x7762</string>
<string>0x7772</string>
<string>0x1006</string>
<string>0x1004</string>
<string>0x0001</string>
<string>0x8009</string>
<string>0x9000</string>
<string>0x9006</string>
<string>0x9007</string>
<string>0x90d0</string>
<string>0x0004</string>
<string>0x0100</string>
<string>0x0020</string>
<string>0x0012</string>
</array>
<key>ifdFriendlyName</key>
<array>
<string>Axalto/Schlumberger/Gemalo egate token</string>
<string>Aladdin eToken PRO</string>
<string>Aladdin eToken PRO</string>
<string>Aladdin eToken PRO 64</string>
<string>Aladdin eToken PRO NG OTP</string>
<string>Eutron CryptoIdendity</string>
<string>Rainbow iKey 2000</string>
<string>Rainbow iKey 3000</string>
<string>G&D Starkey 100</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Generic CCID Reader</string>
<string>Pertosmart Card Reader</string>
<string>Pertosmart Card Reader</string>
<string>Pertosmart Card Reader</string>
<string>Pertosmart Card Reader</string>
<string>Pertosmart Card Reader</string>
<string>Pertosmart Card Reader</string>
<string>WB Electronics Inifinty USB Ulimited</string>
<string>Cyberjack Reader</string>
<string>Aktiv Rutoken S</string>
<string>Aktiv uaToken S</string>
</array>
</dict>
</plist>
user@host:~$
Перезапускал сервис, но на ситуацию это никак не повлияло.
user@host:~$ sudo service openct restart
Restarting smart card terminal framework: OpenCT1 process killed.
.
user@host:~$ sudo pcscd -afddddd
00000000 debuglog.c:269:DebugLogSetLevel() debug level=debug
00000035 debuglog.c:269:DebugLogSetLevel() debug level=debug
00000009 debuglog.c:269:DebugLogSetLevel() debug level=debug
00000009 debuglog.c:269:DebugLogSetLevel() debug level=debug
00000009 debuglog.c:269:DebugLogSetLevel() debug level=debug
00000097 configfile.l:245:DBGetReaderListDir() Parsing conf directory: /etc/reader.conf.d
00000022 configfile.l:287:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/libccidtwin
00000040 configfile.l:287:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/openct
00000025 pcscdaemon.c:556:main() pcsc-lite 1.7.4 daemon ready.
00001123 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000108 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000102 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0024, path: /dev/bus/usb/001/002
00000102 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x05E3, PID: 0x0608, path: /dev/bus/usb/001/012
00000101 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0A89, PID: 0x0028, path: /dev/bus/usb/001/013
00000096 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x05E3, PID: 0x0608, path: /dev/bus/usb/001/012
00000100 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0A89, PID: 0x0020, path: /dev/bus/usb/001/014
00000028 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0A89, PID: 0x0020, path: /dev/bus/usb/001/014
00000010 hotplug_libudev.c:309:HPAddDevice() Adding USB device: Aktiv Co. Rutoken S
00000028 readerfactory.c:934:RFInitializeReader() Attempting startup of Aktiv Co. Rutoken S 00 00 using /usr/lib/pcsc/drivers/ifd-rutokens.bundle/Contents/Linux/librutokens.so
00000120 readerfactory.c:824:RFBindFunctions() Loading IFD Handler 3.0
00000624 readerfactory.c:965:RFInitializeReader() Open Port 0x200000 Failed (usb:0a89)
00000016 readerfactory.c:275:RFAddReader() Aktiv Co. Rutoken S init failed.
00000014 readerfactory.c:985:RFUnInitializeReader() Attempting shutdown of Aktiv Co. Rutoken S 00 00.
00000011 readerfactory.c:861:RFUnloadReader() Unloading reader driver.
00000032 hotplug_libudev.c:377:HPAddDevice() Failed adding USB device: Aktiv Co. Rutoken S
00000017 utils.c:95:CheckForOpenCT() File /var/run/openct/status found. Remove OpenCT and try again
00000105 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x05E3, PID: 0x0608, path: /dev/bus/usb/001/012
00000097 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0024, path: /dev/bus/usb/001/002
00000119 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/002/001
00000115 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/002/001
00000098 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0024, path: /dev/bus/usb/002/002
00000098 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0458, PID: 0x003A, path: /dev/bus/usb/002/003
00000093 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0024, path: /dev/bus/usb/002/002
00000101 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x04D9, PID: 0x1702, path: /dev/bus/usb/002/004
00000093 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x04D9, PID: 0x1702, path: /dev/bus/usb/002/004
00000089 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0024, path: /dev/bus/usb/002/002
^C04526048 pcscdaemon.c:682:signal_trap() Received signal: 2
00000009 pcscdaemon.c:695:signal_trap() Preparing for suicide
00000038 pcscdaemon.c:682:signal_trap() Received signal: 2
00000006 readerfactory.c:1254:RFCleanupReaders() entering cleaning function
00000008 winscard_svc.c:130:ContextsDeinitialize() remaining threads: 0
00000004 pcscdaemon.c:634:at_exit() cleaning /var/run/pcscd
00000025 pcscdaemon.c:634:at_exit() cleaning /var/run/pcscd
00000012 pcscdaemon.c:658:clean_temp_files() Cannot remove /var/run/pcscd/pcscd.comm: No such file or directory
00000007 pcscdaemon.c:663:clean_temp_files() Cannot remove /var/run/pcscd/pcscd.pid: No such file or directory
user@host:~$
если остановить сервис openct, то всё работает
user@host:~$ sudo service openct stop
Stopping smart card terminal framework: OpenCT 1 process killed.
.
user@host:~$ sudo pcscd -afddddd
00000000 debuglog.c:269:DebugLogSetLevel() debug level=debug
00000024 debuglog.c:269:DebugLogSetLevel() debug level=debug
00000005 debuglog.c:269:DebugLogSetLevel() debug level=debug
00000003 debuglog.c:269:DebugLogSetLevel() debug level=debug
00000004 debuglog.c:269:DebugLogSetLevel() debug level=debug
00000089 configfile.l:245:DBGetReaderListDir() Parsing conf directory: /etc/reader.conf.d
00000015 configfile.l:287:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/libccidtwin
00000033 configfile.l:287:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/openct
00000018 pcscdaemon.c:556:main() pcsc-lite 1.7.4 daemon ready.
00001110 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000088 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000086 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0024, path: /dev/bus/usb/001/002
00000095 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x05E3, PID: 0x0608, path: /dev/bus/usb/001/012
00000092 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0A89, PID: 0x0028, path: /dev/bus/usb/001/013
00000085 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x05E3, PID: 0x0608, path: /dev/bus/usb/001/012
00000090 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0A89, PID: 0x0020, path: /dev/bus/usb/001/014
00000018 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0A89, PID: 0x0020, path: /dev/bus/usb/001/014
00000005 hotplug_libudev.c:309:HPAddDevice() Adding USB device: Aktiv Co. Rutoken S
00000021 readerfactory.c:934:RFInitializeReader() Attempting startup of Aktiv Co. Rutoken S 00 00 using /usr/lib/pcsc/drivers/ifd-rutokens.bundle/Contents/Linux/librutokens.so
00000110 readerfactory.c:824:RFBindFunctions() Loading IFD Handler 3.0
00001069 readerfactory.c:295:RFAddReader() Using the reader polling thread
00000622 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x05E3, PID: 0x0608, path: /dev/bus/usb/001/012
00000101 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0024, path: /dev/bus/usb/001/002
00000124 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/002/001
00000101 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/002/001
00000101 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0024, path: /dev/bus/usb/002/002
00000101 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0458, PID: 0x003A, path: /dev/bus/usb/002/003
00000103 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0024, path: /dev/bus/usb/002/002
00000102 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x04D9, PID: 0x1702, path: /dev/bus/usb/002/004
00000095 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x04D9, PID: 0x1702, path: /dev/bus/usb/002/004
00000102 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0024, path: /dev/bus/usb/002/002
00000041 readerfactory.c:1301:RFWaitForReaderInit() Waiting init for reader: Aktiv Co. Rutoken S 00 00
00001027 eventhandler.c:256:EHStatusHandlerThread() powerState: POWER_STATE_POWERED
00000019 Card ATR: 3B 6F 00 FF 00 56 72 75 54 6F 6B 6E 73 30 20 00 00 90 00