fix some output
This commit is contained in:
parent
a967b309da
commit
aa9982fdbe
1 changed files with 2 additions and 6 deletions
|
@ -98,7 +98,7 @@ while :; do
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
-*)
|
-*)
|
||||||
echo "Unknown urgument: »$1«"
|
echo "Unknown urgument: »$1«" >&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -173,7 +173,6 @@ agent_start_or_restart () {
|
||||||
#logdebug "ssh-agent for identity »$ssh_identity«: $agentfile"
|
#logdebug "ssh-agent for identity »$ssh_identity«: $agentfile"
|
||||||
$createonly && logtrace "current loaded keys after action:
|
$createonly && logtrace "current loaded keys after action:
|
||||||
$(ssh_runinagent $agentfile ssh-add -l)"
|
$(ssh_runinagent $agentfile ssh-add -l)"
|
||||||
echo $agentfile
|
|
||||||
ret=0
|
ret=0
|
||||||
else
|
else
|
||||||
logwarning "ssh-identity »$ssh_identity« is not configured. Please create $identitydir and add keys"
|
logwarning "ssh-identity »$ssh_identity« is not configured. Please create $identitydir and add keys"
|
||||||
|
@ -191,7 +190,6 @@ $(ssh_runinagent $agentfile ssh-add -l)"
|
||||||
logdebug "ssh-agent for identity »$ssh_identity«: $agentfile"
|
logdebug "ssh-agent for identity »$ssh_identity«: $agentfile"
|
||||||
# logdebug "currently loaded keys after action:
|
# logdebug "currently loaded keys after action:
|
||||||
#$(ssh_runinagent $agentfile ssh-add -l)"
|
#$(ssh_runinagent $agentfile ssh-add -l)"
|
||||||
echo $agentfile
|
|
||||||
ret=0
|
ret=0
|
||||||
else
|
else
|
||||||
logwarning "no identity given -> exit"
|
logwarning "no identity given -> exit"
|
||||||
|
@ -286,7 +284,6 @@ agent_load_identity_keys () {
|
||||||
|
|
||||||
|
|
||||||
for key in $(ls ${SSH_IDENTITIES_DIR}/${ssh_identity}/*|grep "\.so$"); do
|
for key in $(ls ${SSH_IDENTITIES_DIR}/${ssh_identity}/*|grep "\.so$"); do
|
||||||
echo "key: $key"
|
|
||||||
logdebug "PKCS11_MODULE: ${PKCS11_MODULE:-not set} - key: $key"
|
logdebug "PKCS11_MODULE: ${PKCS11_MODULE:-not set} - key: $key"
|
||||||
#[ -e "${P11M-x}" ] || [ "$(readlink - f $key)" == "$P11M" ] || key="$P11M"
|
#[ -e "${P11M-x}" ] || [ "$(readlink - f $key)" == "$P11M" ] || key="$P11M"
|
||||||
#[ "$(readlink - f $key)" == "$P11M" ] || key="$P11M"
|
#[ "$(readlink - f $key)" == "$P11M" ] || key="$P11M"
|
||||||
|
@ -295,7 +292,7 @@ agent_load_identity_keys () {
|
||||||
export P11M=$PKCS11_MODULE
|
export P11M=$PKCS11_MODULE
|
||||||
logdebug "PKCS11_MODULE: ${PKCS11_MODULE:-not set} - key: $key"
|
logdebug "PKCS11_MODULE: ${PKCS11_MODULE:-not set} - key: $key"
|
||||||
grep -q "PKCS11_MODULE" "${agentfile}" >/dev/null 2>&1 && sed -i -e '/PKCS11_MODULE/d' "${agentfile}"
|
grep -q "PKCS11_MODULE" "${agentfile}" >/dev/null 2>&1 && sed -i -e '/PKCS11_MODULE/d' "${agentfile}"
|
||||||
echo "PKCS11_MODULE=$(readlink -f $key)" | tee -a "${agentfile}"
|
echo "PKCS11_MODULE=$(readlink -f $key)" | tee -a "${agentfile}" >&2
|
||||||
|
|
||||||
tokenfingerprints=($(ssh-keygen -l -D $key|tr -s ' '|awk '{print $2}'))
|
tokenfingerprints=($(ssh-keygen -l -D $key|tr -s ' '|awk '{print $2}'))
|
||||||
|
|
||||||
|
@ -315,7 +312,6 @@ agent_load_identity_keys () {
|
||||||
$remove && logdebug "remove token $key"
|
$remove && logdebug "remove token $key"
|
||||||
logtrace "agentfile1 $agentfile \$SSH_ADD_OPTIONS $key "
|
logtrace "agentfile1 $agentfile \$SSH_ADD_OPTIONS $key "
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue