From 34b2a2a5ad827331d98c385bc4e44c2b215deb25 Mon Sep 17 00:00:00 2001 From: "xiongdian.me" Date: Thu, 3 Aug 2023 19:45:27 +0800 Subject: [PATCH] sagt: reset agent so paths --- tools/sagent.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/sagent.sh b/tools/sagent.sh index aebf317..1ead9e2 100755 --- a/tools/sagent.sh +++ b/tools/sagent.sh @@ -7,7 +7,8 @@ source "$THIS_DIR/common.sh" find_so_file() { - local SO_PATHS=( "/usr/lib64/opensc-pkcs11.so" "/usr/local/lib/opensc-pkcs11.so" "/run/current-system/sw/lib/opensc-pkcs11.so" ) + # they are: ubuntu 22.04, nixos 23.05, macos 13.4 + local SO_PATHS=( "/usr/lib/x86_64-linux-gnu/opensc-pkcs11.so" "/run/current-system/sw/lib/opensc-pkcs11.so" "/Library/OpenSC/lib/opensc-pkcs11.so" ) local SO_FILE for SO_FILE in ${SO_PATHS[*]}; do if [[ -f "$SO_FILE" ]]; then @@ -19,7 +20,7 @@ find_so_file() create_agent() { - ssh-agent -P "/usr/lib64/*,/usr/local/lib/*,/nix/store/*" + ssh-agent -P "/usr/lib/*,/nix/store/*,/Library/*" } kill_agent()