Check for /bin/hotp_verification instead of CONFIG_HOTPKEY

CONFIG_HOTPKEY is not exported to the initrd, check for binary presence.
This commit is contained in:
Marek Marczykowski-Górecki 2022-03-04 00:42:28 +01:00
parent 13a12d157b
commit ab6425cc7e
No known key found for this signature in database
GPG Key ID: BB2ED46ACD2C6CF7

View File

@ -249,7 +249,7 @@ clean_boot_check()
[ $GPG_KEY_COUNT -ne 0 ] && return
# check for USB security token
if [ "$CONFIG_HOTPKEY" = "y" ]; then
if [ -x /bin/hotp_verification ]; then
if ! gpg --card-status > /dev/null ; then
return
fi
@ -541,7 +541,7 @@ else
HOTPKEY_BRANDING="HOTP USB Security Dongle"
fi
if [ "$CONFIG_HOTPKEY" = "y" ]; then
if [ -x /bin/hotp_verification ]; then
enable_usb
fi