Cosmetic change to yubikey detection
This commit is contained in:
parent
407a770161
commit
45b1ffb8db
|
@ -148,21 +148,25 @@ let
|
||||||
umount ${yubikey.storage.mountPoint}
|
umount ${yubikey.storage.mountPoint}
|
||||||
}
|
}
|
||||||
|
|
||||||
ykinfo -v
|
yubikey_missing=true
|
||||||
yubikey_missing="$(ykinfo -v 1>/dev/null 2>&1)$?"
|
ykinfo -v 1>/dev/null 2>&1
|
||||||
if [ "$yubikey_missing" != "0" ]; then
|
if [ $? != "0" ]; then
|
||||||
echo -n "waiting 10 seconds for yubikey to appear..."
|
echo -n "waiting 10 seconds for yubikey to appear..."
|
||||||
for try in $(seq 10); do
|
for try in $(seq 10); do
|
||||||
sleep 1
|
sleep 1
|
||||||
ykinfo -v
|
ykinfo -v 1>/dev/null 2>&1
|
||||||
yubikey_missing="$(ykinfo -v 1>/dev/null 2>&1)$?"
|
if [ $? == "0" ]; then
|
||||||
if [ "$yubikey_missing" == "0" ]; then break; fi
|
yubikey_missing=false
|
||||||
|
break
|
||||||
|
fi
|
||||||
echo -n .
|
echo -n .
|
||||||
done
|
done
|
||||||
echo "ok"
|
echo "ok"
|
||||||
|
else
|
||||||
|
yubikey_missing=false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$yubikey_missing" != "0" ]; then
|
if [ "$yubikey_missing" == true ]; then
|
||||||
echo "no yubikey found, falling back to non-yubikey open procedure"
|
echo "no yubikey found, falling back to non-yubikey open procedure"
|
||||||
open_normally
|
open_normally
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user