Package: opencryptoki
Version: 2.2.4.1+dfsg-2

In /etc/init.d/pkcsslotd, the code:
  if [ ! -d /var/lib/opencryptoki/tpm ] && [ -d /var/lib/opencryptoki/swtok ]
  then
    /usr/sbin/pkcs11_startup
  else
    echo "device not ready yet, aborting."
    exit 0
  fi

This causes opencryptoki to fail to startup if the tpm token is in use, and it 
causes the tpm to fail to startup if the swtok is not in use, both valid 
scenarios. I think the right test is to see if the 
directory /var/lib/opencryptoki has any subdirectories, and only if there are 
none to run pkcs11_startup.

Something like:

  if [ 0 -ge $(find /var/lib/opencryptoki/ -maxdepth 1 -mindepth 1 -type d | 
wc -l) ]; then
    /usr/sbin/pkcs11_startup
  fi

And don't even bother with the "device not ready yet, aborting" part.

Thanks,
David Smith
-- 
man perl | tail -6 | head -2

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to