Fixed added identity reading.
This commit is contained in:
parent
90d66808e0
commit
431af3426d
@ -250,7 +250,9 @@ function _ssh_agent_plugin_add_identities() {
|
|||||||
_ssh_agent_plugin_identity_absolute_path=$(readlink -f "${_ssh_agent_plugin_directory}/${_ssh_agent_plugin_identity}")
|
_ssh_agent_plugin_identity_absolute_path=$(readlink -f "${_ssh_agent_plugin_directory}/${_ssh_agent_plugin_identity}")
|
||||||
|
|
||||||
if [ -r "${_ssh_agent_plugin_identity_absolute_path}" ]; then
|
if [ -r "${_ssh_agent_plugin_identity_absolute_path}" ]; then
|
||||||
ssh-add -l | awk '{print $3}' | xargs -n 1 readlink -f | grep -q "${_ssh_agent_plugin_identity_absolute_path}"
|
ssh-add -l | awk '{print $3}' | while read _ssh_agent_plugin_added_identity; do
|
||||||
|
readlink -f "${_ssh_agent_plugin_added_identity}" | grep -q "${_ssh_agent_plugin_identity_absolute_path}"
|
||||||
|
done
|
||||||
|
|
||||||
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."
|
||||||
|
Loading…
Reference in New Issue
Block a user