fix key when empty P11M
This commit is contained in:
parent
9e6b21fb5b
commit
57e3c22453
1 changed files with 6 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
FILELOGLEVEL=DEBUG
|
||||
# loggerfactory
|
||||
LANG=C
|
||||
for f in logerror logwarn loginfo logdebug logtrace ENTRY EXIT SCRIPTENTRY SCRIPTEXIT; do
|
||||
|
@ -318,10 +319,12 @@ agent-load-identity-keys () {
|
|||
|
||||
|
||||
for key in $(ls ${SSH_IDENTITIES_DIR}/${ssh_identity}/*|grep "\.so$"); do
|
||||
logdebug "P11M: ${P11M:-not set} - key: $key"
|
||||
echo "key: $key"
|
||||
logdebug "P11M1: ${P11M:-not set} - key: $key"
|
||||
#[ -e "${P11M-x}" ] || [ "$(readlink - f $key)" == "$P11M" ] || key="$P11M"
|
||||
[ "$(readlink - f $key)" == "$P11M" ] || key="$P11M"
|
||||
logdebug "P11M: ${P11M:-not set} - key: $key"
|
||||
#[ "$(readlink - f $key)" == "$P11M" ] || key="$P11M"
|
||||
[ "$(readlink -f $key)" != "$P11M" -a "${P11M:-x}" != "x" ] && key="$P11M"
|
||||
logdebug "P11M2: ${P11M:-not set} - key: $key"
|
||||
echo "P11M: ${P11M:-not set} - key: $key"
|
||||
|
||||
tokenfingerprint="$(ssh-keygen -l -D $key|tr -s ' '|awk '{print $2}')"
|
||||
|
|
Loading…
Reference in a new issue