change minor changes
This commit is contained in:
parent
125976716b
commit
7ca1143c4b
1 changed files with 15 additions and 12 deletions
|
@ -287,11 +287,12 @@ agent-load-identity-keys () {
|
||||||
loginfo "pubkeysonly: ${pubkeysonly[@]} (count: ${#pubkeysonly[*]})"
|
loginfo "pubkeysonly: ${pubkeysonly[@]} (count: ${#pubkeysonly[*]})"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for key in $(ls ${SSH_IDENTITIES_DIR}/${ssh_identity}/*|grep "\.so$"); do
|
for key in $(ls ${SSH_IDENTITIES_DIR}/${ssh_identity}/*|grep "\.so$"); do
|
||||||
logdebug "P11M: $P11M - key: $key"
|
logdebug "P11M: ${P11M:-not set} - key: $key"
|
||||||
|
#[ -e "${P11M-x}" ] || [ "$(readlink - f $key)" == "$P11M" ] || key="$P11M"
|
||||||
[ "$(readlink - f $key)" == "$P11M" ] || key="$P11M"
|
[ "$(readlink - f $key)" == "$P11M" ] || key="$P11M"
|
||||||
logdebug "P11M: $P11M - key: $key"
|
logdebug "P11M: ${P11M:-not set} - key: $key"
|
||||||
|
echo "P11M: ${P11M:-not set} - key: $key"
|
||||||
|
|
||||||
tokenfingerprint="$(ssh-keygen -l -D $key|tr -s ' '|awk '{print $2}')"
|
tokenfingerprint="$(ssh-keygen -l -D $key|tr -s ' '|awk '{print $2}')"
|
||||||
|
|
||||||
|
@ -301,12 +302,14 @@ agent-load-identity-keys () {
|
||||||
if $readd || $remove ; then
|
if $readd || $remove ; then
|
||||||
$readd && logdebug "re-add token $key"
|
$readd && logdebug "re-add token $key"
|
||||||
$remove && logdebug "remove token $key"
|
$remove && logdebug "remove token $key"
|
||||||
|
echo agentfile1 $agentfile \$SSH_ADD_OPTIONS $key >&2
|
||||||
logdebug "$(ssh-runinagent $agentfile ssh-add ${SSH_ADD_OPTIONS} -e "${key}" 2>&1)"
|
logdebug "$(ssh-runinagent $agentfile ssh-add ${SSH_ADD_OPTIONS} -e "${key}" 2>&1)"
|
||||||
|
ssh-runinagent $agentfile echo $SSH_AUTH_SOCK >&2
|
||||||
$remove || logdebug "$(ssh-runinagent $agentfile ssh-add ${SSH_ADD_OPTIONS} -s "${key}" 2>&1)"
|
$remove || logdebug "$(ssh-runinagent $agentfile ssh-add ${SSH_ADD_OPTIONS} -s "${key}" 2>&1)"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
logdebug "token: $key is not loaded -> load it"
|
logdebug "token: $key is not loaded -> load it"
|
||||||
logdebug "$(ssh-runinagent $agentfile ssh-add ${SSH_ADD_OPTIONS} -e ${key} 2>&1)"
|
logdebug "$(ssh-runinagent $agentfile ssh-add -v ${SSH_ADD_OPTIONS} -e ${key} 2>&1)"
|
||||||
$remove || logdebug "$(ssh-runinagent $agentfile ssh-add ${SSH_ADD_OPTIONS} -s ${key} 2>&1)"
|
$remove || logdebug "$(ssh-runinagent $agentfile ssh-add ${SSH_ADD_OPTIONS} -s ${key} 2>&1)"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue