set tmux-environment also
This commit is contained in:
parent
e5350dc312
commit
0f9fb26c1e
1 changed files with 3 additions and 4 deletions
|
@ -959,16 +959,15 @@ loadagent() {
|
|||
[ -n "${af:+x}" ] && eval $(<$af)
|
||||
if which tmux 1>/dev/null 2>&1
|
||||
then
|
||||
[ -n "${SSH_AUTH_SOCK:-}" ] && tmux set-environment SSH_AUTH_SOCK $SSH_AUTH_SOCK
|
||||
[ -n "${SSH_AGENT_PID:-}" ] && tmux set-environment SSH_AGENT_PID $SSH_AGENT_PID
|
||||
[ -n "${PKCS11_MODULE:-}" ] && tmux set-environment PKCS11_MODULE $PKCS11_MODULE
|
||||
[ -n "${SSH_AUTH_SOCK:-}" ] && tmux set-environment SSH_AUTH_SOCK $SSH_AUTH_SOCK || tmux set-environment -r SSH_AUTH_SOCK
|
||||
[ -n "${SSH_AGENT_PID:-}" ] && tmux set-environment SSH_AGENT_PID $SSH_AGENT_PID || tmux set-environment -r SSH_AGENT_PID
|
||||
[ -n "${PKCS11_MODULE:-}" ] && tmux set-environment PKCS11_MODULE $PKCS11_MODULE || tmux set-environment -r PKCS11_MODULE
|
||||
fi
|
||||
logdebug "SSH_AUTH_SOCK: ${SSH_AUTH_SOCK-not set}"
|
||||
logdebug "SSH_AGENT_PID: ${SSH_AGENT_PID-not set}"
|
||||
logdebug "PCKS11_MODULE: ${PCKS11_MODULE-not set}"
|
||||
loginfo "currently loaded keys in agent:
|
||||
$(ssh-add -l)"
|
||||
# export P11M=$PKCS11_MODULE
|
||||
|
||||
EXIT
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue