Still trying to fix identity adding.
This commit is contained in:
parent
465415bea2
commit
712a60954f
@ -245,17 +245,17 @@ function _ssh_agent_plugin_add_identities() {
|
|||||||
# Agent has identities added, check if the ones we want are present, add them if not.
|
# Agent has identities added, check if the ones we want are present, add them if not.
|
||||||
local _ssh_agent_plugin_identity
|
local _ssh_agent_plugin_identity
|
||||||
|
|
||||||
for _ssh_agent_plugin_identity in ${_ssh_agent_plugin_identities}; do
|
for _ssh_agent_plugin_identity in ${^_ssh_agent_plugin_identities}; do
|
||||||
local _ssh_agent_plugin_identity_path
|
local _ssh_agent_plugin_identity_path
|
||||||
_ssh_agent_plugin_identity_path="${_ssh_agent_plugin_directory}/${_ssh_agent_plugin_identity}"
|
_ssh_agent_plugin_identity_path="${_ssh_agent_plugin_directory}/${_ssh_agent_plugin_identity}"
|
||||||
|
|
||||||
if [ -r "${_ssh_agent_plugin_identity_path}" ]; then
|
if [ -r "${_ssh_agent_plugin_identity_path}" ]; then
|
||||||
ssh-add -l | awk '{print $3}' | grep -q "${_ssh_agent_plugin_identity_absolute_path}"
|
ssh-add -l | awk '{print $3}' | grep -q "${_ssh_agent_plugin_identity_path}"
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
_ssh_agent_plugin_debug "Adding ${_ssh_agent_plugin_identity} identity."
|
_ssh_agent_plugin_debug "Adding ${_ssh_agent_plugin_identity} identity."
|
||||||
|
|
||||||
ssh-add "${_ssh_agent_plugin_identity_absolute_path}"
|
ssh-add "${_ssh_agent_plugin_identity_path}"
|
||||||
else
|
else
|
||||||
_ssh_agent_plugin_debug "${_ssh_agent_plugin_identity} identity already added."
|
_ssh_agent_plugin_debug "${_ssh_agent_plugin_identity} identity already added."
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user