From 2b25173b376fbc30f894ce081ead8727b904b388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Sat, 18 Feb 2023 21:21:15 +0100 Subject: [PATCH] check if only one token is plugged in --- bin/startagent | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/startagent b/bin/startagent index 514eda0..fbfb2b0 100755 --- a/bin/startagent +++ b/bin/startagent @@ -298,9 +298,9 @@ agent_load_identity_keys () { logtrace "fingerprints: ${fingerprints[*]}" logtrace "tokenfingerprints count: ${#tokenfingerprints[@]}" -# if [ ${#tokenfingerprints[@]} -gt 1 ]; then -# logerr "Found ${#tokenfingerprints[@]} in p11-kit-proxy! Check if only one token is plugged into your computer" -# else + if [ ${#tokenfingerprints[@]} -gt 1 ]; then + logerr "Found ${#tokenfingerprints[@]} in p11-kit-proxy! Check if only one token is plugged into your computer" + else tokenfingerprint=${tokenfingerprints[0]} logtrace "tokenfingerprint: ${tokenfingerprint}" if [[ "${fingerprints[@]}" =~ "$tokenfingerprint" ]]; then