Read SLOT numeric value

This commit is contained in:
Karel Srot 2024-09-27 11:11:35 +02:00
commit be6296bd39

View file

@ -39,7 +39,7 @@
PACKAGE="opencryptoki"
LOGDIR=`mktemp -d`
[ -z "$SLOT" ] && SLOT=sw
function reset_tokens() {
rlLogInfo "Reseting tokens..."
@ -84,7 +84,7 @@ rlJournalStart
pkcsconf -t
# allow to pass SLOT number as a parameter
# or take the first available slot (Token)
[ -z "$SLOT" ] && SLOT=`pkcsconf -t | sed -n 's/^Token #\([0-9]\).*/\1/gp' | head -n 1`
SLOT=$( pkcsGetTokenSlot $SLOT )
rlLogInfo "Token under a test"
pkcsconf -t -c $SLOT