mirror of
https://github.com/DictXiong/dotfiles.git
synced 2025-04-25 00:47:06 +08:00
piv logi fix
This commit is contained in:
parent
3ce5a7ade8
commit
412655d436
4
.zshrc2
4
.zshrc2
|
@ -96,15 +96,17 @@ case $(bash "$DOTFILES/tools/common.sh" get_os_type) in
|
||||||
esac
|
esac
|
||||||
piv-agent()
|
piv-agent()
|
||||||
{
|
{
|
||||||
|
eval $(ssh-agent -k)
|
||||||
# they are: ubuntu, macos, respectively
|
# they are: ubuntu, macos, respectively
|
||||||
local SO_PATHS=( "/usr/lib64/opensc-pkcs11.so" "/usr/local/lib/opensc-pkcs11.so" )
|
local SO_PATHS=( "/usr/lib64/opensc-pkcs11.so" "/usr/local/lib/opensc-pkcs11.so" )
|
||||||
for i in ${SO_PATHS[*]}; do
|
for i in ${SO_PATHS[*]}; do
|
||||||
if [[ -f "$i" ]]; then
|
if [[ -f "$i" ]]; then
|
||||||
|
echo "using: $i"
|
||||||
eval $(ssh-agent -P "$i")
|
eval $(ssh-agent -P "$i")
|
||||||
ssh-add -s "$i"
|
ssh-add -s "$i"
|
||||||
echo "now available keys:"
|
echo "now available keys:"
|
||||||
ssh-add -l
|
ssh-add -l
|
||||||
break
|
return 0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "opensc-pkcs11.so not found"
|
echo "opensc-pkcs11.so not found"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user